From 1854075a62c6ca0422040b4e5ebf89088b0d02b2 Mon Sep 17 00:00:00 2001
From: Antonio Gallo <tonicucoz@gmail.com>
Date: Tue, 15 Feb 2011 00:32:19 +0000
Subject: added wiki - part 1

---
 h-source/tables.sql | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

(limited to 'h-source/tables.sql')

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
-- 
cgit v1.2.3

