parent
fd05ff03d6
commit
2fe2a123a4
|
@ -1,3 +1,6 @@
|
|||
--
|
||||
-- Table structure for access
|
||||
--
|
||||
|
||||
CREATE TABLE access (
|
||||
aid SERIAL,
|
||||
|
@ -8,6 +11,9 @@ CREATE TABLE access (
|
|||
UNIQUE (mask)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for authmap
|
||||
--
|
||||
|
||||
CREATE TABLE authmap (
|
||||
aid SERIAL,
|
||||
|
@ -18,6 +24,9 @@ CREATE TABLE authmap (
|
|||
UNIQUE (authname)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for blocks
|
||||
--
|
||||
|
||||
CREATE TABLE blocks (
|
||||
name varchar(64) NOT NULL default '',
|
||||
|
@ -32,6 +41,9 @@ CREATE TABLE blocks (
|
|||
PRIMARY KEY (name)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for book
|
||||
--
|
||||
|
||||
CREATE TABLE book (
|
||||
nid integer NOT NULL default '0',
|
||||
|
@ -41,9 +53,11 @@ CREATE TABLE book (
|
|||
log text,
|
||||
PRIMARY KEY (nid)
|
||||
);
|
||||
|
||||
CREATE INDEX book_nid_idx ON book(nid);
|
||||
|
||||
--
|
||||
-- Table structure for boxes
|
||||
--
|
||||
|
||||
CREATE TABLE boxes (
|
||||
bid SERIAL,
|
||||
|
@ -56,6 +70,9 @@ CREATE TABLE boxes (
|
|||
UNIQUE (title)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for bundle
|
||||
--
|
||||
|
||||
CREATE TABLE bundle (
|
||||
bid SERIAL,
|
||||
|
@ -65,6 +82,9 @@ CREATE TABLE bundle (
|
|||
UNIQUE (title)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for cache
|
||||
--
|
||||
|
||||
CREATE TABLE cache (
|
||||
cid varchar(255) NOT NULL default '',
|
||||
|
@ -73,15 +93,9 @@ CREATE TABLE cache (
|
|||
PRIMARY KEY (cid)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE collection (
|
||||
cid SERIAL,
|
||||
name varchar(32) NOT NULL default '',
|
||||
types varchar(128) NOT NULL default '',
|
||||
PRIMARY KEY (cid),
|
||||
UNIQUE (name)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for comments
|
||||
--
|
||||
|
||||
CREATE TABLE comments (
|
||||
cid SERIAL,
|
||||
|
@ -95,9 +109,11 @@ CREATE TABLE comments (
|
|||
link varchar(16) NOT NULL default '',
|
||||
PRIMARY KEY (cid)
|
||||
);
|
||||
|
||||
CREATE INDEX comments_lid_idx ON comments(nid);
|
||||
|
||||
--
|
||||
-- Table structure for directory
|
||||
--
|
||||
|
||||
CREATE TABLE directory (
|
||||
link varchar(255) NOT NULL default '',
|
||||
|
@ -109,6 +125,9 @@ CREATE TABLE directory (
|
|||
PRIMARY KEY (link)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for feed
|
||||
--
|
||||
|
||||
CREATE TABLE feed (
|
||||
fid SERIAL,
|
||||
|
@ -124,6 +143,9 @@ CREATE TABLE feed (
|
|||
UNIQUE (url)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for history
|
||||
--
|
||||
|
||||
CREATE TABLE history (
|
||||
uid integer NOT NULL default '0',
|
||||
|
@ -132,6 +154,9 @@ CREATE TABLE history (
|
|||
PRIMARY KEY (uid,nid)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for item
|
||||
--
|
||||
|
||||
CREATE TABLE item (
|
||||
iid SERIAL,
|
||||
|
@ -145,12 +170,18 @@ CREATE TABLE item (
|
|||
PRIMARY KEY (iid)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for layout
|
||||
--
|
||||
|
||||
CREATE TABLE layout (
|
||||
uid integer NOT NULL default '0',
|
||||
block varchar(64) NOT NULL default ''
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for locales
|
||||
--
|
||||
|
||||
CREATE TABLE locales (
|
||||
lid SERIAL,
|
||||
|
@ -167,6 +198,9 @@ CREATE TABLE locales (
|
|||
PRIMARY KEY (lid)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for moderate
|
||||
--
|
||||
|
||||
CREATE TABLE moderate (
|
||||
cid integer NOT NULL default '0',
|
||||
|
@ -175,16 +209,21 @@ CREATE TABLE moderate (
|
|||
score integer NOT NULL default '0',
|
||||
timestamp integer NOT NULL default '0'
|
||||
);
|
||||
|
||||
CREATE INDEX moderate_cid_idx ON moderate(cid);
|
||||
CREATE INDEX moderate_nid_idx ON moderate(nid);
|
||||
|
||||
--
|
||||
-- Table structure for modules
|
||||
--
|
||||
|
||||
CREATE TABLE modules (
|
||||
name varchar(64) NOT NULL default '',
|
||||
PRIMARY KEY (name)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for node
|
||||
--
|
||||
|
||||
CREATE TABLE node (
|
||||
nid SERIAL,
|
||||
|
@ -207,14 +246,15 @@ CREATE TABLE node (
|
|||
static integer NOT NULL default '0',
|
||||
PRIMARY KEY (nid)
|
||||
);
|
||||
|
||||
CREATE INDEX node_type_idx ON node(type);
|
||||
CREATE INDEX node_title_idx ON node(title,type);
|
||||
CREATE INDEX node_promote_idx ON node(promote);
|
||||
CREATE INDEX node_status_idx ON node(status);
|
||||
CREATE INDEX node_uid_idx ON node(uid);
|
||||
|
||||
|
||||
--
|
||||
-- Table structure for page
|
||||
--
|
||||
|
||||
CREATE TABLE page (
|
||||
nid integer NOT NULL default '0',
|
||||
|
@ -222,18 +262,22 @@ CREATE TABLE page (
|
|||
format smallint NOT NULL default '0',
|
||||
PRIMARY KEY (nid)
|
||||
);
|
||||
|
||||
CREATE INDEX page_nid_idx ON page(nid);
|
||||
|
||||
--
|
||||
-- Table structure for permission
|
||||
--
|
||||
|
||||
CREATE TABLE permission (
|
||||
rid integer NOT NULL default '0',
|
||||
perm text,
|
||||
tid integer NOT NULL default '0'
|
||||
);
|
||||
|
||||
CREATE INDEX permission_rid_idx ON permission(rid);
|
||||
|
||||
--
|
||||
-- Table structure for poll
|
||||
--
|
||||
|
||||
CREATE TABLE poll (
|
||||
nid integer NOT NULL default '0',
|
||||
|
@ -243,6 +287,9 @@ CREATE TABLE poll (
|
|||
PRIMARY KEY (nid)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for poll_choices
|
||||
--
|
||||
|
||||
CREATE TABLE poll_choices (
|
||||
chid SERIAL,
|
||||
|
@ -253,6 +300,9 @@ CREATE TABLE poll_choices (
|
|||
PRIMARY KEY (chid)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for rating
|
||||
--
|
||||
|
||||
CREATE TABLE rating (
|
||||
uid integer NOT NULL default '0',
|
||||
|
@ -261,12 +311,18 @@ CREATE TABLE rating (
|
|||
PRIMARY KEY (uid)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for referrer
|
||||
--
|
||||
|
||||
CREATE TABLE referrer (
|
||||
url varchar(255) NOT NULL default '',
|
||||
timestamp integer NOT NULL default '0'
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for role
|
||||
--
|
||||
|
||||
CREATE TABLE role (
|
||||
rid SERIAL,
|
||||
|
@ -275,6 +331,9 @@ CREATE TABLE role (
|
|||
UNIQUE (name)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for search_index
|
||||
--
|
||||
|
||||
CREATE TABLE search_index (
|
||||
word varchar(50) NOT NULL,
|
||||
|
@ -282,10 +341,12 @@ CREATE TABLE search_index (
|
|||
type varchar(16) default NULL,
|
||||
count integer default NULL
|
||||
);
|
||||
|
||||
CREATE INDEX search_index_lno_idx ON search_index(lno);
|
||||
CREATE INDEX search_index_word_idx ON search_index(word);
|
||||
|
||||
--
|
||||
-- Table structure for site
|
||||
--
|
||||
|
||||
CREATE TABLE site (
|
||||
sid SERIAL,
|
||||
|
@ -301,6 +362,9 @@ CREATE TABLE site (
|
|||
UNIQUE (link)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for system
|
||||
--
|
||||
|
||||
CREATE TABLE system (
|
||||
filename varchar(255) NOT NULL default '',
|
||||
|
@ -311,16 +375,20 @@ CREATE TABLE system (
|
|||
PRIMARY KEY (filename)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for sequences
|
||||
-- This is only used under MySQL, co commented out
|
||||
--
|
||||
--
|
||||
-- CREATE TABLE sequences (
|
||||
-- name varchar(255) NOT NULL,
|
||||
-- id integer NOT NULL,
|
||||
-- PRIMARY KEY (name)
|
||||
-- );
|
||||
|
||||
CREATE TABLE tag (
|
||||
tid SERIAL,
|
||||
name varchar(32) NOT NULL default '',
|
||||
attributes varchar(255) NOT NULL default '',
|
||||
collections varchar(32) NOT NULL default '',
|
||||
PRIMARY KEY (tid),
|
||||
UNIQUE (name,collections)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for term_data
|
||||
--
|
||||
|
||||
CREATE TABLE term_data (
|
||||
tid SERIAL,
|
||||
|
@ -330,45 +398,55 @@ CREATE TABLE term_data (
|
|||
weight smallint NOT NULL default '0',
|
||||
PRIMARY KEY (tid)
|
||||
);
|
||||
|
||||
CREATE INDEX term_data_vid_idx ON term_data(vid);
|
||||
|
||||
--
|
||||
-- Table structure for term_hierarchy
|
||||
--
|
||||
|
||||
CREATE TABLE term_hierarchy (
|
||||
tid integer NOT NULL default '0',
|
||||
parent integer NOT NULL default '0'
|
||||
);
|
||||
|
||||
CREATE INDEX term_hierarchy_tid_idx ON term_hierarchy(tid);
|
||||
CREATE INDEX term_hierarchy_parent_idx ON term_hierarchy(parent);
|
||||
|
||||
--
|
||||
-- Table structure for term_node
|
||||
--
|
||||
|
||||
CREATE TABLE term_node (
|
||||
nid integer NOT NULL default '0',
|
||||
tid integer NOT NULL default '0'
|
||||
);
|
||||
|
||||
CREATE INDEX term_node_nid_idx ON term_node(nid);
|
||||
CREATE INDEX term_node_tid_idx ON term_node(tid);
|
||||
|
||||
--
|
||||
-- Table structure for term_relation
|
||||
--
|
||||
|
||||
CREATE TABLE term_relation (
|
||||
tid1 integer NOT NULL default '0',
|
||||
tid2 integer NOT NULL default '0'
|
||||
);
|
||||
|
||||
CREATE INDEX term_relation_tid1_idx ON term_relation(tid1);
|
||||
CREATE INDEX term_relation_tid2_idx ON term_relation(tid2);
|
||||
|
||||
--
|
||||
-- Table structure for term_synonym
|
||||
--
|
||||
|
||||
CREATE TABLE term_synonym (
|
||||
tid integer NOT NULL default '0',
|
||||
name varchar(255) NOT NULL default ''
|
||||
);
|
||||
|
||||
CREATE INDEX term_synonym_tid_idx ON term_synonym(tid);
|
||||
CREATE INDEX term_synonym_name_idx ON term_synonym(name);
|
||||
|
||||
--
|
||||
-- Table structure for users
|
||||
--
|
||||
|
||||
CREATE TABLE users (
|
||||
uid SERIAL,
|
||||
|
@ -396,6 +474,9 @@ CREATE TABLE users (
|
|||
UNIQUE (name)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for variable
|
||||
--
|
||||
|
||||
CREATE TABLE variable (
|
||||
name varchar(32) NOT NULL default '',
|
||||
|
@ -403,6 +484,9 @@ CREATE TABLE variable (
|
|||
PRIMARY KEY (name)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for vocabulary
|
||||
--
|
||||
|
||||
CREATE TABLE vocabulary (
|
||||
vid SERIAL,
|
||||
|
@ -417,6 +501,9 @@ CREATE TABLE vocabulary (
|
|||
PRIMARY KEY (vid)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for watchdog
|
||||
--
|
||||
|
||||
CREATE TABLE watchdog (
|
||||
wid SERIAL,
|
||||
|
@ -429,6 +516,9 @@ CREATE TABLE watchdog (
|
|||
PRIMARY KEY (wid)
|
||||
);
|
||||
|
||||
--
|
||||
-- Insert some default values
|
||||
--
|
||||
|
||||
INSERT INTO variable(name,value) VALUES('update_start', '2002-05-15');
|
||||
INSERT INTO system VALUES ('archive.module','archive','module','',1);
|
||||
|
|
Loading…
Reference in New Issue