use sursa;



create or replace table form(

    id int auto_increment primary key,

    nom varchar(100),

    postnom varchar(100),

    prenom varchar(100),

    sexe varchar(100),

    date_nais date,

    date_arrivee date,

    nationalite varchar(100),

    pays_origine varchar(100),

    num_passeport varchar(100),

    telephone varchar(100),

    email varchar(100),

    voie_transport varchar(100),

    compagnie varchar(100),

    num_vol varchar(100),

    province varchar(100),

    num_siege varchar(100),

    destination varchar(100),

    pays_visite varchar(100),

    fievre boolean default true,

    sensation_fievre boolean default true,

    test_covid boolean default true,

    toux boolean default true,

    frisson boolean default true,

    difficulte_respiratoire boolean default true,

    assurance_maladie boolean default true,

    adresse varchar(100),

    date_creat datetime default current_timestamp,

    langue varchar(100) default 'fr',

    etat varchar(100) default 'Actif',

    idUser int

);

create or replace table updates(

    id int auto_increment primary key,

    idUser int,

    old_state text,

    new_state text,

    date_creat datetime default current_timestamp

);

create or replace table user(

    id int auto_increment primary key,

    pseudo varchar(100),

    pwd varchar(100),

    profil varchar(100),

    etat varchar(100) default 'Actif'

);