]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - schemas/schema.minisql
Upped the size of the "searchterms" field.
[SourceForge/phpwiki.git] / schemas / schema.minisql
1 # $Id: schema.minisql,v 1.2 2000-06-25 07:34:36 wainstead Exp $
2
3 drop table wiki\g
4 drop table archive\g
5 drop table wikilinks\g
6 drop table hottopics\g
7 drop table hitcount\g
8
9 CREATE TABLE wiki (
10         pagename CHAR(100) NOT NULL,
11         version INT NOT NULL,
12         flags INT NOT NULL,
13         author CHAR(100),
14         lastmodified INT NOT NULL,
15         created INT NOT NULL,
16         content TEXT(1024),
17         refs TEXT(100),
18         searchterms char(2048)
19         )
20 \g
21
22 CREATE UNIQUE INDEX wiki_index ON wiki (pagename)
23 \g
24
25 CREATE TABLE archive (
26         pagename CHAR(100) NOT NULL,
27         version INT NOT NULL,
28         flags INT NOT NULL,
29         author CHAR(100),
30         lastmodified INT NOT NULL,
31         created INT NOT NULL,
32         content TEXT(1024),
33         refs TEXT(100),
34         searchterms char(2048)
35         )
36 \g
37
38 CREATE UNIQUE INDEX archive_index ON archive (pagename, version)
39 \g
40
41 # tables below are not yet used
42
43 CREATE TABLE wikilinks (
44         frompage CHAR(100) NOT NULL,
45         topage CHAR(100) NOT NULL
46         )
47 \g
48
49 CREATE UNIQUE INDEX wikilinks_index ON wikilinks (frompage, topage)
50 \g
51
52 CREATE TABLE hottopics (                
53         pagename CHAR(100) NOT NULL,
54         lastmodified INT NOT NULL
55         )
56 \g
57
58 CREATE UNIQUE INDEX hottopics_index ON hottopics (pagename, lastmodified)
59 \g
60
61 CREATE TABLE hitcount (                 
62         pagename CHAR(100) NOT NULL, 
63         hits INT NOT NULL
64         )
65 \g
66
67 CREATE UNIQUE INDEX hitcount_index ON hitcount (pagename)
68 \g
69