-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinit-db.sql
27 lines (24 loc) · 843 Bytes
/
init-db.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
CREATE database if not EXISTS pretty default character set = 'utf8mb4'; ;
use pretty;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_user
-- ----------------------------
DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`gender` int(11) NOT NULL,
`status` int(11) DEFAULT '0',
`age` int(11) NOT NULL,
`description` varchar(255) DEFAULT '',
`birthday` date NOT NULL,
`deleted` bit(1) NOT NULL DEFAULT b'0',
`created_time` datetime DEFAULT CURRENT_TIMESTAMP,
`created_by` varchar(255) DEFAULT NULL,
`updated_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP,
`updated_by` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
SET FOREIGN_KEY_CHECKS = 1;