]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - schemas/mysql.sql
Renamed these files with .sql extensions for two reasons: the naming was
[SourceForge/phpwiki.git] / schemas / mysql.sql
1 -- $Id: mysql.sql,v 1.1 2001-12-03 04:05:38 wainstead Exp $
2
3 drop table if exists page;
4 CREATE TABLE page (
5         id              INT NOT NULL,
6         pagename        VARCHAR(100) BINARY NOT NULL,
7         hits            INT NOT NULL DEFAULT 0,
8         pagedata        MEDIUMTEXT NOT NULL DEFAULT '',
9         PRIMARY KEY (id),
10         UNIQUE KEY (pagename)
11 );
12
13 drop table if exists version;
14 CREATE TABLE version (
15         id              INT NOT NULL,
16         version         INT NOT NULL,
17         mtime           INT NOT NULL,
18         minor_edit      TINYINT DEFAULT 0,
19         content         MEDIUMTEXT NOT NULL DEFAULT '',
20         versiondata     MEDIUMTEXT NOT NULL DEFAULT '',
21         PRIMARY KEY (id,version),
22         INDEX (mtime)
23 );
24
25 drop table if exists recent;
26 CREATE TABLE recent (
27         id              INT NOT NULL,
28         latestversion   INT,
29         latestmajor     INT,
30         latestminor     INT,
31         PRIMARY KEY (id)
32 );
33
34 drop table if exists nonempty;
35 CREATE TABLE nonempty (
36         id              INT NOT NULL,
37         PRIMARY KEY (id)
38 );
39
40 drop table if exists link;
41 CREATE TABLE link (
42         linkfrom        INT NOT NULL,
43         linkto          INT NOT NULL,
44         INDEX (linkfrom),
45         INDEX (linkto)
46 );
47