1 -- $Id: mysql-test-initialize.sql,v 1.1 2004-11-03 16:55:03 rurban Exp $
2 -- for the regression suite
4 CREATE TABLE test_page (
5 id INT NOT NULL AUTO_INCREMENT,
6 pagename VARCHAR(100) BINARY NOT NULL,
7 hits INT NOT NULL DEFAULT 0,
8 pagedata MEDIUMTEXT NOT NULL DEFAULT '',
13 CREATE TABLE test_version (
17 minor_edit TINYINT DEFAULT 0,
18 content MEDIUMTEXT NOT NULL DEFAULT '',
19 versiondata MEDIUMTEXT NOT NULL DEFAULT '',
20 PRIMARY KEY (id,version),
24 CREATE TABLE test_recent (
32 CREATE TABLE test_nonempty (
37 CREATE TABLE test_link (
38 linkfrom INT NOT NULL,
44 CREATE TABLE test_session (
45 sess_id CHAR(32) NOT NULL DEFAULT '',
46 sess_data BLOB NOT NULL,
47 sess_date INT UNSIGNED NOT NULL,
48 sess_ip CHAR(15) NOT NULL,
49 PRIMARY KEY (sess_id),
51 ); -- TYPE=heap; -- if your Mysql supports it and you have enough RAM
53 -- upgrade to 1.3.8: (see lib/upgrade.php)
54 -- ALTER TABLE session ADD sess_ip CHAR(15) NOT NULL;
55 -- CREATE INDEX sess_date on session (sess_date);
56 -- update to 1.3.10: (see lib/upgrade.php)
57 -- ALTER TABLE page CHANGE id id INT NOT NULL AUTO_INCREMENT;
59 -- Optional DB Auth and Prefs
60 -- For these tables below the default table prefix must be used
61 -- in the DBAuthParam SQL statements also.
63 CREATE TABLE test_pref (
64 userid CHAR(48) BINARY NOT NULL UNIQUE,
65 prefs TEXT NULL DEFAULT '',
69 -- better use the extra pref table where such users can be created easily
71 CREATE TABLE test_user (
72 userid CHAR(48) BINARY NOT NULL UNIQUE,
73 passwd CHAR(48) BINARY DEFAULT '',
74 -- prefs TEXT NULL DEFAULT '',
75 -- groupname CHAR(48) BINARY DEFAULT 'users',
79 -- only if you plan to use the wikilens theme
80 CREATE TABLE test_rating (
81 dimension INT(4) NOT NULL,
82 raterpage INT(11) NOT NULL,
83 rateepage INT(11) NOT NULL,
84 ratingvalue FLOAT NOT NULL,
85 rateeversion INT(11) NOT NULL,
86 tstamp TIMESTAMP(14) NOT NULL,
87 PRIMARY KEY (dimension, raterpage, rateepage)