Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

MySql: DateTime size doesn't get picked by createTable / addColumn changesets

$
0
0
Running the following changeset using liquibase-3.2.2 (on mySql 5.6):
  1. < createTable   tableName = "myTable" >   
  2.     < column   name = "myId"   type = "BIGINT(20) UNSIGNED" >   
  3.         < constraints   nullable = "false" />   
  4.     </ column >   
  5.      < column   name = "my_time"   type = "datetime(3)" >   
  6.         < constraints   nullable = "false" />   
  7.     </ column >   
  8. </ createTable>

Will create the "my_time" column with "datetime" type instead of "datetime(3)" type, which means - it won't store milliseconds.
As a workaround, I create the table using <sql> changeset.

(also, FYI, I couldn't find a way to open a JIRA ticket in https://liquibase.jira.com/ - it didn't allow me to create a user using any of my email addresses saying my domain is not allowed)

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>