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

Error running yaml changelog after using generateChangeLog on database

$
0
0
Hello,
I'm wondering if someone can provide me some direction on what I'm doing wrong in generating my yaml file.  I currently have my changelogs in xml and it was decided we would convert everything to yml.  I used the generateChangeLog on my database that was built using the xml to reverse it all into yml.  When I try to run my liquibase update with the newly created yml files in a clean database I'm receiving an error.  What is happening is my datetime fields that have a defaultValueComputed: CURRENT_TIMESTAMP are being translated to now() in the sql statement and throwing an error during my run.  This is what the generateChangeLog created in the create table statement:
        - column:
            constraints:
              constraints:
                nullable: false
            defaultValueComputed: CURRENT_TIMESTAMP
            name: CreateDateTime
            type: datetime(6)
and here is the error:
Unexpected error running Liquibase: Invalid default value for 'CreateDateTime'
...inside the create statement - CreateDateTime datetime(6) DEFAULT NOW() NULL

In case it helps the table that exists in the database was created with the column looking like this in xml:

           <column defaultValueComputed="CURRENT_TIMESTAMP" name="CreatedDateTime" type="datetime">
                <constraints nullable="false"/>
            </column>

I am using liquibase 3.4.1

Thank you!

Viewing all articles
Browse latest Browse all 2993

Trending Articles



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