aboutsummaryrefslogtreecommitdiff
path: root/h-source/tables.sql
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-02-15 00:32:19 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-02-15 00:32:19 +0000
commit1854075a62c6ca0422040b4e5ebf89088b0d02b2 (patch)
tree4c725cb4ef2b6eab95c0db23cfedcfb3c1406be4 /h-source/tables.sql
parent99e87e1869e49c67bea2b779283def0e98f39bca (diff)
added wiki - part 1
Diffstat (limited to 'h-source/tables.sql')
-rw-r--r--h-source/tables.sql44
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