158 lines
3.9 KiB
Plaintext
158 lines
3.9 KiB
Plaintext
|
|
CREATE TABLE authors (
|
|
aid varchar(30) DEFAULT '' NOT NULL,
|
|
name varchar(50),
|
|
url varchar(60),
|
|
email varchar(60),
|
|
pwd varchar(12),
|
|
PRIMARY KEY (aid)
|
|
);
|
|
|
|
CREATE TABLE bans (
|
|
id tinyint(4) DEFAULT '0' NOT NULL auto_increment,
|
|
mask varchar(255) DEFAULT '' NOT NULL,
|
|
type tinyint(2) DEFAULT '0' NOT NULL,
|
|
reason text NOT NULL,
|
|
timestamp int(11),
|
|
UNIQUE mask (mask),
|
|
PRIMARY KEY (id)
|
|
);
|
|
|
|
CREATE TABLE diaries (
|
|
id int DEFAULT '0' NOT NULL auto_increment;
|
|
author int DEFAULT '0' NOT NULL,
|
|
text text NOT NULL,
|
|
timestamp int(11),
|
|
PRIMARY KEY(id)
|
|
);
|
|
|
|
CREATE TABLE blocks (
|
|
id tinyint(4) DEFAULT '0' NOT NULL auto_increment,
|
|
author varchar(30),
|
|
title varchar(60),
|
|
content text,
|
|
PRIMARY KEY (id)
|
|
);
|
|
|
|
CREATE TABLE channel (
|
|
id int(11) DEFAULT '0' NOT NULL auto_increment,
|
|
site varchar(255) DEFAULT '' NOT NULL,
|
|
file varchar(255) DEFAULT '' NOT NULL,
|
|
url varchar(255) DEFAULT '' NOT NULL,
|
|
contact varchar(255) DEFAULT '',
|
|
timestamp int(11),
|
|
UNIQUE site (site),
|
|
UNIQUE file (file),
|
|
UNIQUE url (url),
|
|
PRIMARY KEY (id)
|
|
);
|
|
|
|
CREATE TABLE comments (
|
|
tid int(11) DEFAULT '0' NOT NULL auto_increment,
|
|
pid int(11) DEFAULT '0',
|
|
sid int(11) DEFAULT '0',
|
|
date datetime,
|
|
name varchar(60) DEFAULT '' NOT NULL,
|
|
email varchar(60),
|
|
url varchar(60),
|
|
host_name varchar(60),
|
|
subject varchar(60) DEFAULT '' NOT NULL,
|
|
comment text NOT NULL,
|
|
score tinyint(4) DEFAULT '0' NOT NULL,
|
|
reason tinyint(4) DEFAULT '0' NOT NULL,
|
|
PRIMARY KEY (tid)
|
|
);
|
|
|
|
CREATE TABLE headlines (
|
|
id int(11) DEFAULT '0' NOT NULL,
|
|
title varchar(255) DEFAULT '' NOT NULL,
|
|
link varchar(255) DEFAULT '' NOT NULL,
|
|
number int(3) DEFAULT '0' NOT NULL,
|
|
UNIQUE title (title),
|
|
UNIQUE link (link)
|
|
);
|
|
|
|
CREATE TABLE poll (
|
|
id int(11) DEFAULT '0' NOT NULL auto_increment,
|
|
question varchar(150),
|
|
answer1 varchar(100),
|
|
answer2 varchar(100),
|
|
answer3 varchar(100),
|
|
answer4 varchar(100),
|
|
answer5 varchar(100),
|
|
answer6 varchar(100),
|
|
votes1 tinyint(4),
|
|
votes2 tinyint(4),
|
|
votes3 tinyint(4),
|
|
votes4 tinyint(4),
|
|
votes5 tinyint(4),
|
|
votes6 tinyint(4),
|
|
status tinyint(4) DEFAULT '0',
|
|
PRIMARY KEY (id)
|
|
);
|
|
|
|
|
|
CREATE TABLE refer (
|
|
url varchar(255) DEFAULT '' NOT NULL,
|
|
name varchar(255),
|
|
status int(1) DEFAULT '1',
|
|
refers int(7) DEFAULT '0',
|
|
create_dt int(11),
|
|
access_dt int(11),
|
|
PRIMARY KEY (url)
|
|
);
|
|
|
|
CREATE TABLE stories (
|
|
id int(11) DEFAULT '0' NOT NULL auto_increment,
|
|
author int(6) DEFAULT '0' NOT NULL,
|
|
subject varchar(255) DEFAULT '' NOT NULL,
|
|
abstract text NOT NULL,
|
|
updates text NOT NULL,
|
|
article text NOT NULL,
|
|
category varchar(128) DEFAULT '' NOT NULL,
|
|
department varchar(128) DEFAULT '' NOT NULL,
|
|
timestamp int(11) DEFAULT '0' NOT NULL,
|
|
score int(11) DEFAULT '0' NOT NULL,
|
|
votes int(11) DEFAULT '0' NOT NULL,
|
|
status int(4) DEFAULT '1',
|
|
PRIMARY KEY (id)
|
|
);
|
|
|
|
CREATE TABLE users (
|
|
id int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
|
|
name varchar(60) DEFAULT '' NOT NULL,
|
|
userid varchar(15) DEFAULT '' NOT NULL,
|
|
passwd varchar(20) DEFAULT '' NOT NULL,
|
|
email varchar(255) DEFAULT '' NOT NULL,
|
|
femail varchar(60) DEFAULT '' NOT NULL,
|
|
url varchar(100) DEFAULT '' NOT NULL,
|
|
storynum tinyint(4) DEFAULT '10',
|
|
umode varchar(10) DEFAULT '' NOT NULL,
|
|
uorder tinyint(1) DEFAULT '0' NOT NULL,
|
|
thold tinyint(1) DEFAULT '0' NOT NULL,
|
|
noscore tinyint(1) DEFAULT '0' NOT NULL,
|
|
bio tinytext NOT NULL,
|
|
ublockon tinyint(1) DEFAULT '0' NOT NULL,
|
|
ublock text,
|
|
theme varchar(255) DEFAULT '' NOT NULL,
|
|
signature varchar(255) DEFAULT '' NOT NULL,
|
|
last_access int(10) unsigned,
|
|
last_host varchar(255),
|
|
access int(10) unsigned DEFAULT '0' NOT NULL,
|
|
status tinyint(4) DEFAULT '0' NOT NULL,
|
|
history text NOT NULL,
|
|
PRIMARY KEY (id)
|
|
);
|
|
|
|
CREATE TABLE webboard (
|
|
topic_id int(11) DEFAULT '0' NOT NULL auto_increment,
|
|
parent_id int(11) DEFAULT '0',
|
|
root_id int(11) DEFAULT '0',
|
|
subject varchar(255),
|
|
message text,
|
|
create_dt int(11) DEFAULT '0',
|
|
author varchar(255),
|
|
hostname varchar(255),
|
|
PRIMARY KEY (topic_id)
|
|
);
|