1 -- $Id: mysql.sql,v 1.12 2004-04-12 10:07:45 rurban Exp $
3 drop table if exists page;
6 pagename VARCHAR(100) BINARY NOT NULL,
7 hits INT NOT NULL DEFAULT 0,
8 pagedata MEDIUMTEXT NOT NULL DEFAULT '',
13 drop table if exists version;
14 CREATE TABLE version (
18 minor_edit TINYINT DEFAULT 0,
19 content MEDIUMTEXT NOT NULL DEFAULT '',
20 versiondata MEDIUMTEXT NOT NULL DEFAULT '',
21 PRIMARY KEY (id,version),
25 drop table if exists recent;
34 drop table if exists nonempty;
35 CREATE TABLE nonempty (
40 drop table if exists link;
42 linkfrom INT NOT NULL,
48 drop table if exists session;
49 CREATE TABLE session (
50 sess_id CHAR(32) NOT NULL DEFAULT '',
51 sess_data BLOB NOT NULL,
52 sess_date INT UNSIGNED NOT NULL,
53 sess_ip CHAR(15) NOT NULL,
54 PRIMARY KEY (sess_id),
56 ); -- TYPE=heap; -- if your Mysql supports it and you have enough RAM
58 -- upgrade from 1.3.7:
59 -- ALTER TABLE session ADD sess_ip CHAR(15) NOT NULL;
60 -- CREATE INDEX sess_date on session (sess_date);
62 -- Optional DB Auth and Prefs
63 -- For these tables below the default table prefix must be used
64 -- in the DBAuthParam SQL statements also.
66 drop table if exists pref;
68 userid CHAR(48) BINARY NOT NULL UNIQUE,
69 prefs TEXT NULL DEFAULT '',
73 -- better use the extra pref table where such users can be created easily
75 drop table if exists user;
77 userid CHAR(48) BINARY NOT NULL UNIQUE,
78 passwd CHAR(48) BINARY DEFAULT '',
79 -- prefs TEXT NULL DEFAULT '',
80 -- groupname CHAR(48) BINARY DEFAULT 'users',
84 drop table if exists member;
86 userid CHAR(48) BINARY NOT NULL,
87 groupname CHAR(48) BINARY NOT NULL DEFAULT 'users',
92 -- if you plan to use the wikilens theme
93 drop table if exists rating;
95 dimension INT(4) NOT NULL,
96 raterpage INT(11) NOT NULL,
97 rateepage INT(11) NOT NULL,
98 ratingvalue FLOAT NOT NULL,
99 rateeversion INT(11) NOT NULL,
100 tstamp TIMESTAMP(14) NOT NULL,
101 PRIMARY KEY (dimension, raterpage, rateepage)