Can't update from a generated changelog

Hi, I’m new here, this is my first topic! I didn’t know where else to go so I figured this could be the right place to solve my problem.

First of all, I’m using an npm library called liquibase to run Liquibase within Node.

So, I’m trying to use diffChangeLog to compare two databases and generate a changelog of their differences. The changelog is normally generated, but when I try to run an update using the generated changelog Liquibase responds with a validation error. Here’s the output:

node_modules/liquibase/lib/liquibase-4.0.0/liquibase --changeLogFile=examples/common/migration.xml --url="jdbc:mysql://" --username=migration --password=migration --classpath=lib/migrator/drivers/mysql-connector-java-8.0.22.jar --changeLogFile=examples/DatabaseDiff/diffChangeLog.xml update 

Liquibase Community 4.0.0-beta1 by Datical
    Starting Liquibase at 17:54:32 (version 4.0.0-beta1 #6 built at 2020-04-20 18:23+0000)
    Unexpected error running Liquibase: Validation Failed:
         16 changes have validation failures
              columns is empty, examples/DatabaseDiff/diffChangeLog.xml::1618001652047-1::joao (generated)
              columns is empty, examples/DatabaseDiff/diffChangeLog.xml::1618001652047-2::joao (generated)
              columns is empty, examples/DatabaseDiff/diffChangeLog.xml::1618001652047-3::joao (generated)
              columns is empty, examples/DatabaseDiff/diffChangeLog.xml::1618001652047-4::joao (generated)
              columns is empty, examples/DatabaseDiff/diffChangeLog.xml::1618001652047-5::joao (generated)
              columns is empty, examples/DatabaseDiff/diffChangeLog.xml::1618001652047-6::joao (generated)
              columns is empty, examples/DatabaseDiff/diffChangeLog.xml::1618001652047-7::joao (generated)
              columns is empty, examples/DatabaseDiff/diffChangeLog.xml::1618001652047-8::joao (generated)
              columns is empty, examples/DatabaseDiff/diffChangeLog.xml::1618001652047-9::joao (generated)
              columns is empty, examples/DatabaseDiff/diffChangeLog.xml::1618001652047-10::joao (generated)
              columns is empty, examples/DatabaseDiff/diffChangeLog.xml::1618001652047-11::joao (generated)
              columns is empty, examples/DatabaseDiff/diffChangeLog.xml::1618001652047-12::joao (generated)
              columns is empty, examples/DatabaseDiff/diffChangeLog.xml::1618001652047-13::joao (generated)
              columns is empty, examples/DatabaseDiff/diffChangeLog.xml::1618001652047-14::joao (generated)
              columns is empty, examples/DatabaseDiff/diffChangeLog.xml::1618001652047-15::joao (generated)
              columns is empty, examples/DatabaseDiff/diffChangeLog.xml::1618001652047-16::joao (generated)

For more information, please use the --logLevel flag

And here is part of the changelog that is mentioned in the output:

<changeSet author="joao (generated)" id="1618001652047-2">
    <createTable tableName="FeaturedProducer"/>
<changeSet author="joao (generated)" id="1618001652047-3">
    <createTable tableName="PreVerification"/>
<changeSet author="joao (generated)" id="1618001652047-4">
    <createTable tableName="Producer"/>

I also tried to use the SQL format for the generated changelog (named changeLog.mysql.sql), but it creates a bad SQL syntax, for example:


This raises a syntax error from MySQL. Which is right, I’ve tried running this query manually and the error is the same.

My guess is that Liquibase is not allowing me to create empty columns, but why?
I don’t understand what’s going on and there are not many results on Google.
Can anyone give me a hand?!

Hi @jgtvares ,

Are you the 2 databases you are comparing both mysql?