19 lines
491 B
SQL
19 lines
491 B
SQL
CREATE TABLE `tbl_user` (
|
|
`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,
|
|
`postCount` INT NOT NULL DEFAULT 0,
|
|
PRIMARY KEY (`id`));
|
|
|
|
|
|
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`));
|