1 drop table if exists votes
;
2 drop table if exists users
;
5 id INTEGER primary key autoincrement
,
6 email
TEXT unique not null,
7 password TEXT not null,
10 is_admin
INTEGER default 0 not null,
15 id INTEGER primary key autoincrement
,
19 date_begin
INTEGER default CURRENT_TIMESTAMP not null,
20 date_end
INTEGER not null,
21 is_transparent
INTEGER default 1 not null,
22 is_public
INTEGER default 1 not null,
23 is_multiplechoice
INTEGER default 1 not null,
24 is_weighted
INTEGER default 0 not null,
25 is_closed
INTEGER default 0 not null,
26 id_author
INTEGER, -- :COMMENT:maethor:120528: not null ?
28 FOREIGN KEY(id_author
) REFERENCES users(id)
29 --FOREIGN KEY(id_role) REFERENCES role(id)
34 insert into users (email
, password, name, organization
, is_admin
, key) values ("admin@admin.fr", "admin", "Toto (admin) Tata", "World corp", 1, "test");