*The following took place on a Windows 8.0 PC with MySQL Version 5.7.19 and liquibase 3.6.2 installed.
I have a MySQL database that I created from a liquibase change log file that myself and another developer are using. My developer made some changes and generate the diff change log (the diff change log contained dropping columns, add tables, adding foreign keys) which I was able to successfully apply to my local MySQL database. I then went to generate a changelog file off that updated MySQL database and the generateChangLog command completes successfully but when I look at the resulting changelog XML file; all the createTable tags in each changeSet tag were missing the column tags for each table. Is this normal?
I even tried dropping the ‘databasechangelog’ and ‘databasechangeloglock’ tables in the updated MySQL database before generating a changelog and that failed as well. So I am not sure why liquibase is excluding columns in the createTable tags.
To get around this I manually updated the original changelog XML file making all the changes by hand (dropping columns, adding tables, adding foreign keys) and then creating a new MySQL database (ChangeLogTestTwoDb). From there I was able to successful generate a changelog file off the ChangeLogTestTwoDb database.
For some reason; after applying the diffChangeLog to an existing database (that was created by a liquibase changelog) I am not able to create a new changelog file from the current state of the database.
Has anyone experienced this before? Is this expected behavior?
There wasn’t that many changes this time, so making manual edits to an existing changelog XML file was not too bad. But going forward, I won’t be able to do that. I did find an old ticket (https://liquibase.jira.com/browse/CORE-2142) where the same behavior was found, but that was 4 years ago and I am already using the latest version of liquibase.
I am using liquibase commands through windows command prompt when applying and/or generating new changelog files in the description above.