]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - schemas/schema.mysql
Updated table names so all are prefaced with 'phpwiki_'. This is not
[SourceForge/phpwiki.git] / schemas / schema.mysql
1 -- $Id: schema.mysql,v 1.5 2001-07-12 03:21:35 wainstead Exp $
2
3 drop table if exists phpwiki_pages;
4 drop table if exists phpwiki_archive;
5 drop table if exists phpwiki_wikilinks;
6 drop table if exists phpwiki_hitcount;
7 drop table if exists phpwiki_score;
8 drop table if exists phpwiki_hottopics;
9
10
11 CREATE TABLE phpwiki_pages (
12         pagename VARCHAR(100) NOT NULL,
13         version INT NOT NULL DEFAULT 1,
14         flags INT NOT NULL DEFAULT 0,
15         author VARCHAR(100),
16         lastmodified INT NOT NULL,
17         created INT NOT NULL,
18         content MEDIUMTEXT NOT NULL,
19         refs TEXT,
20         PRIMARY KEY (pagename)
21         );
22
23 CREATE TABLE phpwiki_archive (
24         pagename VARCHAR(100) NOT NULL,
25         version INT NOT NULL DEFAULT 1,
26         flags INT NOT NULL DEFAULT 0,
27         author VARCHAR(100),
28         lastmodified INT NOT NULL,
29         created INT NOT NULL,
30         content MEDIUMTEXT NOT NULL,
31         refs TEXT,
32         PRIMARY KEY (pagename, version)
33         );
34
35 CREATE TABLE phpwiki_links (
36         frompage VARCHAR(100) NOT NULL,
37         topage VARCHAR(100) NOT NULL,
38         PRIMARY KEY (frompage, topage)
39         );
40
41 CREATE TABLE phpwiki_hitcount (
42         pagename VARCHAR(100) NOT NULL,
43         hits INT NOT NULL DEFAULT 0,
44         PRIMARY KEY (pagename)
45         );
46
47 CREATE TABLE phpwiki_score (
48         pagename VARCHAR(100) NOT NULL,
49         score INT NOT NULL DEFAULT 0,
50         PRIMARY KEY (pagename)
51         );
52
53
54 -- tables below are not yet used
55
56 CREATE TABLE phpwiki_hottopics (                
57         pagename VARCHAR(100) NOT NULL,
58         lastmodified INT NOT NULL,
59         PRIMARY KEY (pagename, lastmodified)
60         );