Skip to content

Commit c9cbee4

Browse files
nocvalight昱恒
andauthored
fix create table sql in mysql (#305)
Co-authored-by: 昱恒 <[email protected]>
1 parent afae389 commit c9cbee4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

create_table.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ CREATE TABLE IF NOT EXISTS `app_revision`
77
`base_params` text DEFAULT NULL COMMENT '基础参数',
88
`service_params` text DEFAULT NULL COMMENT '服务参数',
99
`service_params_large` mediumtext DEFAULT NULL COMMENT '服务参数',
10-
`gmt_create` timestamp NOT NULL COMMENT '创建时间',
11-
`gmt_modified` timestamp NOT NULL COMMENT '修改时间',
10+
`gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
11+
`gmt_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
1212
`client_version` varchar(512) DEFAULT NULL COMMENT '客户端版本',
1313
`deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否被删除',
1414
PRIMARY KEY (`id`),
@@ -21,8 +21,8 @@ CREATE TABLE IF NOT EXISTS `interface_apps_index`
2121
`data_center` varchar(128) NOT NULL COMMENT '集群名称',
2222
`app_name` varchar(128) NOT NULL COMMENT '应用名',
2323
`interface_name` varchar(386) NOT NULL COMMENT '接口名',
24-
`gmt_create` timestamp(6) NOT NULL COMMENT '创建时间',
25-
`gmt_modified` timestamp(6) NOT NULL COMMENT '修改时间',
24+
`gmt_create` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间',
25+
`gmt_modified` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '修改时间',
2626
`hashcode` varchar(128) NOT NULL COMMENT '唯一索引hashcode',
2727
`reference` tinyint(4) NOT NULL COMMENT '是否被引用',
2828
PRIMARY KEY (`id`),
@@ -88,7 +88,7 @@ CREATE TABLE IF NOT EXISTS `recover_config`
8888

8989
CREATE TABLE IF NOT EXISTS `multi_cluster_sync_info`
9090
(
91-
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键' primary key,
91+
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
9292
`data_center` varchar(512) NOT NULL COMMENT '集群名称',
9393
`remote_data_center` varchar(512) NOT NULL COMMENT '同步的集群名称',
9494
`remote_meta_address` varchar(1024) NOT NULL COMMENT '同步的集群地址',

0 commit comments

Comments
 (0)