2001-04-05 20:33:36 +00:00
|
|
|
# 05/04/2001:
|
|
|
|
|
|
|
|
CREATE TABLE variable (
|
|
|
|
name varchar(32) DEFAULT '' NOT NULL,
|
|
|
|
value varchar(128) DEFAULT '' NOT NULL,
|
|
|
|
PRIMARY KEY (name)
|
|
|
|
);
|
|
|
|
|
2001-04-02 15:54:37 +00:00
|
|
|
# 01/04/2001:
|
|
|
|
|
|
|
|
CREATE TABLE access (
|
|
|
|
id tinyint(10) DEFAULT '0' NOT NULL auto_increment,
|
|
|
|
mask varchar(255) DEFAULT '' NOT NULL,
|
|
|
|
type varchar(16) DEFAULT '' NOT NULL,
|
|
|
|
reason text NOT NULL,
|
|
|
|
UNIQUE mask (mask),
|
|
|
|
PRIMARY KEY (id)
|
|
|
|
);
|
|
|
|
|
2001-03-25 11:25:30 +00:00
|
|
|
CREATE TABLE book (
|
2001-03-29 19:50:31 +00:00
|
|
|
lid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
|
|
|
|
nid int(10) unsigned DEFAULT '0' NOT NULL,
|
2001-03-25 11:25:30 +00:00
|
|
|
body text NOT NULL,
|
|
|
|
section int(10) DEFAULT '0' NOT NULL,
|
|
|
|
parent int(10) DEFAULT '0' NOT NULL,
|
|
|
|
weight tinyint(3) DEFAULT '0' NOT NULL,
|
2001-03-29 19:50:31 +00:00
|
|
|
PRIMARY KEY (lid)
|
2001-03-25 11:25:30 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE story (
|
2001-03-29 19:50:31 +00:00
|
|
|
lid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
|
|
|
|
nid int(10) unsigned DEFAULT '0' NOT NULL,
|
2001-03-25 11:25:30 +00:00
|
|
|
abstract text NOT NULL,
|
|
|
|
body text NOT NULL,
|
|
|
|
section varchar(64) DEFAULT '' NOT NULL,
|
2001-03-29 19:50:31 +00:00
|
|
|
PRIMARY KEY (lid)
|
2001-03-25 11:25:30 +00:00
|
|
|
);
|
|
|
|
|
2001-03-29 19:50:31 +00:00
|
|
|
CREATE TABLE node (
|
2001-03-25 11:25:30 +00:00
|
|
|
nid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
|
2001-03-29 19:50:31 +00:00
|
|
|
lid int(10) DEFAULT '0' NOT NULL,
|
|
|
|
pid int(10) DEFAULT '0' NOT NULL,
|
2001-03-25 11:25:30 +00:00
|
|
|
log text NOT NULL,
|
|
|
|
type varchar(16) DEFAULT '' NOT NULL,
|
|
|
|
title varchar(128) DEFAULT '' NOT NULL,
|
|
|
|
score int(11) DEFAULT '0' NOT NULL,
|
|
|
|
votes int(11) DEFAULT '0' NOT NULL,
|
|
|
|
author int(6) DEFAULT '0' NOT NULL,
|
|
|
|
status int(4) DEFAULT '1' NOT NULL,
|
|
|
|
timestamp int(11) NOT NULL,
|
|
|
|
KEY type (lid, type),
|
|
|
|
KEY author (author),
|
|
|
|
KEY title (title, type),
|
|
|
|
PRIMARY KEY (nid)
|
|
|
|
);
|
|
|
|
|
|
|
|
alter table users change stories nodes tinyint(2) DEFAULT '10';
|
2001-03-25 17:54:35 +00:00
|
|
|
alter table comments drop link;
|