FreePad/db/migrations/000001_posts.up.sql

13 lines
473 B
MySQL
Raw Normal View History

2022-05-15 12:43:42 +03:00
CREATE TABLE IF NOT EXISTS `t_posts` (
2022-05-15 15:21:21 +03:00
`id` INT(11) NOT NULL AUTO_INCREMENT,
2022-05-15 12:43:42 +03:00
`name` VARCHAR(256) NOT NULL DEFAULT '' COLLATE 'latin1_swedish_ci',
`content` MEDIUMTEXT NOT NULL COLLATE 'latin1_swedish_ci',
`ts` DATETIME NOT NULL DEFAULT current_timestamp(),
`ts_updated` DATETIME NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `name` (`name`) USING BTREE
2022-05-15 12:43:42 +03:00
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
;