Create Tables

The following SQL statements create the tables used in this site.

delimiter $$

CREATE TABLE `daocanoncategory` (
`id` int(11) NOT NULL default '1',
`category` varchar(45) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8$$

 

CREATE TABLE `daocanonseries` (
`id` int(11) NOT NULL,
`series` varchar(45) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8$$

 

CREATE TABLE `daocanontoc` (
`id` int(11) NOT NULL default '1',
`category` int(11) default '0',
`serial` int(11) default '0',
`scroll` int(11) default '0',
`page` int(11) default '0',
`title` varchar(250) default '',
`volumes` varchar(250) default '',
`author` varchar(250) default '',
`hanfenlou_scroll` int(11) default '0',
`hanfenlou_page` varchar(250) default '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8$$

 

CREATE TABLE `daocanonsynopsis` (
`tocid` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
`synopsis` text NOT NULL,
PRIMARY KEY (`tocid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8$$

CREATE TABLE `daocanontext` (
`id` int(11) NOT NULL,
`docid` int(11) default '0',
`pid` int(11) NOT NULL default '0',
`toc` int(11) default '1' COMMENT '=1为目录项;=0为经文;=-1为空页面',
`title` varchar(250) default '',
`filename` varchar(250) default '',
`intro` varchar(2000) default '',
`url` varchar(500) NOT NULL,
`category` int(2) NOT NULL default '0',
`series` int(2) NOT NULL default '0',
`text` mediumtext NOT NULL,
PRIMARY KEY (`id`),
KEY `docid` (`docid`),
KEY `toc` (`toc`),
KEY `category` (`category`),
KEY `series` (`series`),
KEY `pid` (`pid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `daocanonimages` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(250) NOT NULL default '',
`image` mediumblob,
PRIMARY KEY (`id`),
UNIQUE KEY `name_UNIQUE` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=44992 DEFAULT CHARSET=utf8;