chinese-journal/yii/protected/data/schema.mysql.sql

19 lines
491 B
MySQL
Raw Permalink Normal View History

2014-11-22 13:14:22 +00:00
CREATE TABLE `tbl_user` (
2014-11-21 08:26:20 +00:00
`id` INT NOT NULL AUTO_INCREMENT,
`username` VARCHAR(45) NOT NULL,
`email` VARCHAR(45) NOT NULL,
`password` TEXT NOT NULL,
`level` INT NOT NULL DEFAULT 0,
2014-11-22 13:14:22 +00:00
`postCount` INT NOT NULL DEFAULT 0,
2014-11-21 08:26:20 +00:00
PRIMARY KEY (`id`));
2014-11-22 13:14:22 +00:00
CREATE TABLE `tbl_post` (
`id` INT NOT NULL AUTO_INCREMENT,
`username` VARCHAR(45) NOT NULL,
`title` VARCHAR(45) NOT NULL,
`text` TEXT NOT NULL,
`imageFileName` TEXT NOT NULL,
`date` DATETIME NOT NULL,
PRIMARY KEY (`id`));