diff options
Diffstat (limited to 'h-source/tables.sql')
-rw-r--r-- | h-source/tables.sql | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/h-source/tables.sql b/h-source/tables.sql index a447d71..3a50a1a 100644 --- a/h-source/tables.sql +++ b/h-source/tables.sql @@ -231,3 +231,47 @@ create table history ( ); insert into reggroups (name) values ('moderator'); + + +create table wiki ( + id_wiki INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + created_by int not null, + creation_date timestamp default CURRENT_TIMESTAMP, + update_date datetime not null, + title varchar(100) CHARACTER SET utf8 not null, + title_clean varchar(100) CHARACTER SET utf8 not null, + page text CHARACTER SET utf8 not null, + deleted char(3) not null default 'no', + is_main char(3) not null default 'no' +)engine=innodb; + +create table wiki_revisions ( + id_rev INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + created_by int not null, + creation_date timestamp default CURRENT_TIMESTAMP, + update_date datetime not null, + title varchar(100) CHARACTER SET utf8 not null, + title_clean varchar(100) CHARACTER SET utf8 not null, + page text CHARACTER SET utf8 not null, + id_wiki INT UNSIGNED NOT NULL +)engine=innodb; + +create table wiki_users ( + id_user int(11) UNSIGNED not null, + id_wiki int(11) UNSIGNED not null, + index wiki_indx(id_wiki), + index user_indx(id_user), + foreign key wiki_fky(id_wiki) references wiki (id_wiki), + foreign key user_fky(id_user) references regusers (id_user), + unique (id_user,id_wiki) +)engine=innodb; + +create table wiki_talk ( + id_talk INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + created_by int not null, + creation_date timestamp default CURRENT_TIMESTAMP, + title varchar(100) CHARACTER SET utf8 not null, + message text CHARACTER SET utf8 not null, + id_wiki INT UNSIGNED NOT NULL, + deleted char(4) not null default 'no' +)engine=innodb;
\ No newline at end of file |