CREATE TABLE user_login0 LIKE user_login; CREATE TABLE user_login1 LIKE user_login; CREATE TABLE user_login2 LIKE user_login; CREATE TABLE user_login3 LIKE user_login; CREATE TABLE user_login4 LIKE user_login; CREATE TABLE user_login5 LIKE user_login; CREATE TABLE user_login6 LIKE user_login; CREATE TABLE user_login7 LIKE user_login; CREATE TABLE user_login8 LIKE user_login; CREATE TABLE user_login9 LIKE user_login; CREATE TABLE user_login10 LIKE user_login;
ALTER TABLE test_1 ADD hascount INTEGER NOT NULL Default 0 COMMENT '总编制';
ALTER TABLE test_1 ADD note TEXT COMMENT '备注';
— 2.新增test_2表
DROP TABLE IF EXISTS `test_2`;
CREATE TABLE `test_2` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
`operate_time` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '操作时间',
`operator_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '操作者id',
`proname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '项目名',
`update_field` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '变更字段',
`update_before` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '变更前',
`update_after` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '变更后',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 146 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
— 3.新增test_3表
DROP TABLE IF EXISTS `test_3`;
CREATE TABLE `test_3` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键id',
`group_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '组名',
`hascount` int(11) NULL DEFAULT NULL COMMENT '总编制',
`note` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;