1 # This file contains a complete database schema for all the
2 # tables used by this module, written in SQL
4 # It may also contain INSERT statements for particular data
5 # that may be used, especially new entries in the table log_display
8 CREATE TABLE `prefix_wiki` (
9 `id` int(10) unsigned NOT NULL auto_increment,
10 `course` int(10) unsigned NOT NULL default '0',
11 `name` varchar(255) NOT NULL default '',
12 `summary` text NOT NULL,
13 `pagename` varchar(255) default NULL,
14 `wtype` enum('teacher','group','student') NOT NULL default 'group',
15 `ewikiprinttitle` tinyint(4) NOT NULL default '1',
16 `htmlmode` tinyint(4) NOT NULL default '0',
17 `ewikiacceptbinary` tinyint(4) NOT NULL default '0',
18 `disablecamelcase` tinyint(4) NOT NULL default '0',
19 `setpageflags` tinyint(4) NOT NULL default '1',
20 `strippages` tinyint(4) NOT NULL default '1',
21 `removepages` tinyint(4) NOT NULL default '1',
22 `revertchanges` tinyint(4) NOT NULL default '1',
23 `initialcontent` varchar(255) default NULL,
24 `timemodified` int(10) NOT NULL default '0',
26 KEY `course` (`course`)
27 ) TYPE=MyISAM COMMENT='Main wiki table';
31 # Table structure for table `mdl_wiki_entries`
34 CREATE TABLE `prefix_wiki_entries` (
35 `id` int(10) NOT NULL auto_increment,
36 `wikiid` int(10) NOT NULL default '0',
37 `course` int(10) NOT NULL default '0',
38 `groupid` int(10) NOT NULL default '0',
39 `userid` int(10) NOT NULL default '0',
40 `pagename` varchar(255) NOT NULL default '',
41 `timemodified` int(10) NOT NULL default '0',
43 KEY `wikiid` (`wikiid`),
44 KEY `course` (`course`),
45 KEY `gropuid` (`groupid`),
46 KEY `userid` (`userid`),
47 KEY `pagename` (`pagename`)
48 ) TYPE=MyISAM COMMENT='Holds entries for each wiki start instance.';
51 CREATE TABLE `prefix_wiki_pages` (
52 `id` int(10) unsigned NOT NULL auto_increment,
53 `pagename` VARCHAR(160) NOT NULL,
54 `version` INTEGER UNSIGNED NOT NULL DEFAULT 0,
55 `flags` INTEGER UNSIGNED DEFAULT 0,
57 `author` VARCHAR(100) DEFAULT 'ewiki',
58 `userid` INTEGER UNSIGNED NOT NULL DEFAULT 0,
59 `created` INTEGER UNSIGNED DEFAULT 0,
60 `lastmodified` INTEGER UNSIGNED DEFAULT 0,
63 `hits` INTEGER UNSIGNED DEFAULT 0,
64 `wiki` int(10) unsigned NOT NULL,
65 PRIMARY KEY `id` (`id`),
66 UNIQUE KEY `wiki_pages_uk` (`pagename`, `version`, `wiki`)
67 ) TYPE=MyISAM COMMENT='Holds the Wiki-Pages';