loveoobaby commented on a change in pull request #446: fix mysql master_lock 
table schema wrong default value
URL: https://github.com/apache/servicecomb-pack/pull/446#discussion_r271551893
 
 

 ##########
 File path: alpha/alpha-server/src/main/resources/schema-mysql.sql
 ##########
 @@ -116,8 +116,8 @@ CREATE TABLE IF NOT EXISTS tcc_tx_event (
 
 CREATE TABLE IF NOT EXISTS master_lock (
   serviceName varchar(36) not NULL,
-  expireTime timestamp(3) not NULL,
-  lockedTime timestamp(3) not NULL,
+  expireTime datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
 
 Review comment:
   if expireTime can be null, the sql should change to:
   ```SQL
   CREATE TABLE IF NOT EXISTS master_lock (
     serviceName varchar(36) not NULL,
     expireTime datetime,
     lockedTime datetime not NULL DEFAULT CURRENT_TIMESTAMP,
     instanceId  varchar(255) not NULL,
     PRIMARY KEY (serviceName)
   ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to