create table contis (
        nom text primary key,
        description text,
        lecture_seule boolean default 'f' not null,
        prochain_numero integer default 0 not null
);

create table droits (
        moderateur text not null,
        conti text foreign key contis references nom,
        ecrire boolean,
        unique (moderateur,conti)
);

create table messages (
        id text primary key,
        pere text,
        fils text,
        subject text not null,
        sender text not null,
        "from" text not null,
        date text,
        numero_fichier integer default 0 not null
);

create table messages_contis (
        message text not null,
        conti text foreign key contis references nom,
        numero integer not null,
        unique (message, conti),
        primary key (conti, numero)
);

create table refs (
        de text not null,
        a text not null,
        unique (de, a)
);

