It sounds like you are doing reasonable steps and getting unexpected results. I see you have logLevel debug already set, can you share the logs?
Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/
It sounds like you are doing reasonable steps and getting unexpected results. I see you have logLevel debug already set, can you share the logs?
Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/
Hello, I’m new to Liquibase and am looking to see how it can be used on an already existing project. I found the documentation on how to generate a changelog against our existing MySql DB. But all of my attempts to do so have created changelogs which fail validation as part of a later update/changeLogSync command due to the fact that no column definitions are included in the create table commands.
In case it illuminates a mistake I’m making, there’s the command I ran:
>java -jar c:\shortenedPath\liquibase-core-3.5.3.jar --driver=com.mysql.jdbc.Driver --classpath=c:\shortenedPath\mysql-connector-java-5.1.42.jar --changeLogFile=changelog.mysql.xml --url=jdbc:mysql://localhost/mySchema --username=root --password=password --logLevel=DEBUG --defaultSchemaName=mySchema generateChangeLogand here’s a snippet of the generated changelog:
<?xml version="1.1" encoding="UTF-8" standalone="no"?><databaseChangeLog xmlns=“http://www.liquibase.org/xml/ns/dbchangelog” xmlns:ext=“http://www.liquibase.org/xml/ns/dbchangelog-ext” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=“http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd”>
…
Lastly I’m running this against a local mysql DB which claims to be version 5.6.26-log running on Win7. Hopefully I’m just doing something wrong/dumb and you can point me in the better direction. Thanks!
-Erik
Sure. Sorry it’s a bit ugly (thanks terrible windows command line).
C:\Users\elumpkin\Desktop>java -jar c:\Users\elumpkin.gradle\caches\modules-2\f
iles-2.1\org.liquibase\liquibase-core\3.5.3\f346404c3876c5bd0e07a7e10b7565bdcd35
dbab\liquibase-core-3.5.3.jar --driver=com.mysql.jdbc.Driver --classpath=c:\User
s\elumpkin.gradle\caches\modules-2\files-2.1\mysql\mysql-connector-java\5.1.42</div>
80a448a3ec2178b649bb2e3cb3610fab06e11669\mysql-connector-java-5.1.42.jar --chang
eLogFile=changelog.mysql.xml --url=jdbc:mysql://localhost/cais --username=root -
-password=password --logLevel=DEBUG --defaultSchemaName=cais generateChangeLog
DEBUG 1/31/18 5:17 PM: liquibase: Connected to root@localhost@jdbc:mysql://local
host/cais
DEBUG 1/31/18 5:17 PM: liquibase: Setting auto commit to false from true
DEBUG 1/31/18 5:17 PM: liquibase: Executing EXECUTE database command: USE cais
DEBUG 1/31/18 5:17 PM: liquibase: Computed checksum for 1517440651454 as 5842fe5
70773e5316474acef11f7cfca
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='campaig
nreferral’ and const.constraint_name='emailaddress_unique’order by ordinal_posit
ion
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='campaig
nreferral’ and const.constraint_name='campaigntoken_unique’order by ordinal_posi
tion
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='fundmap
ping’ and const.constraint_name='unique’order by ordinal_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='adminad
visorteam’ and const.constraint_name='uniq’order by ordinal_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='redempt
ion_document’ and const.constraint_name='fundid_unique’order by ordinal_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='positio
n_by_nav’ and const.constraint_name='id_unique’order by ordinal_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='positio
n’ and const.constraint_name='positionid_unique’order by ordinal_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='sharecl
assdocument’ and const.constraint_name='shareclassdocumentclient’order by ordina
l_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='acl_sid
’ and const.constraint_name='unique_uk_1’order by ordinal_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='rebate_
by_nav’ and const.constraint_name='id_unique’order by ordinal_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='adminin
vestmententity’ and const.constraint_name='uniq’order by ordinal_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='ofacven
dor’ and const.constraint_name='vendorid_unique’order by ordinal_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='product
documents’ and const.constraint_name='uniq’order by ordinal_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='investm
ententitydocument’ and const.constraint_name='uniq’order by ordinal_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='acl_cla
ss’ and const.constraint_name='unique_uk_2’order by ordinal_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='cmequit
yoffering’ and const.constraint_name='internalcusip_unique’order by ordinal_posi
tion
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='cmprefe
rredofferings’ and const.constraint_name='internalcusip_unique’order by ordinal_
position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='documen
t’ and const.constraint_name='documentid_unique’order by ordinal_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='documen
t’ and const.constraint_name='hasheddocid_unique’order by ordinal_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='fundser
ies’ and const.constraint_name='fundseriesid_unique’order by ordinal_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='fundser
ies’ and const.constraint_name='fundshareclass-uniq’order by ordinal_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='acl_obj
ect_identity’ and const.constraint_name='unique_uk_3’order by ordinal_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select const
.CONSTRAINT_NAME, COLUMN_NAME from information_schema.table_constraints const jo
in information_schema.key_column_usage col on const.constraint_schema=col.constr
aint_schema and const.table_name=col.table_name and const.constraint_name=col.co
nstraint_name where const.constraint_schema=‘cais’ and const.table_name='acl_ent
ry’ and const.constraint_name='unique_uk_4’order by ordinal_position
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select view_
definition from information_schema.views where table_name=‘vw_weeklyestimates’ a
nd table_schema=‘cais’
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select view_
definition from information_schema.views where table_name='vw_populatechartdatab
ytotalfunds’ and table_schema=‘cais’
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select view_
definition from information_schema.views where table_name=‘vw_producttype’ and t
able_schema=‘cais’
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select view_
definition from information_schema.views where table_name='hierarchyrelationship
’ and table_schema=‘cais’
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select view_
definition from information_schema.views where table_name=‘vw_monthlyactuals’ an
d table_schema=‘cais’
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select view_
definition from information_schema.views where table_name=‘vw_uncomplete_task’ a
nd table_schema=‘cais’
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select view_
definition from information_schema.views where table_name='vw_available_offshore
_funds’ and table_schema=‘cais’
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select view_
definition from information_schema.views where table_name=‘vw_factsheetdata’ and
table_schema=‘cais’
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select view_
definition from information_schema.views where table_name=‘vw_monthlyestimates’
and table_schema=‘cais’
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select view_
definition from information_schema.views where table_name=‘vw_positiongraphdata’
and table_schema=‘cais’
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select view_
definition from information_schema.views where table_name='vw_available_onshore_
funds’ and table_schema=‘cais’
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select view_
definition from information_schema.views where table_name=‘vw_facetednav’ and ta
ble_schema=‘cais’
DEBUG 1/31/18 5:17 PM: liquibase: Executing QUERY database command: select view_
definition from information_schema.views where table_name=‘vw_gettaskstatus’ and
table_schema=‘cais’
INFO 1/31/18 5:17 PM: liquibase: Can not use class liquibase.serializer.core.yam
l.YamlChangeLogSerializer as a Liquibase service because org.yaml.snakeyaml.repr
esenter.Representer is not in the classpath
INFO 1/31/18 5:17 PM: liquibase: Can not use class liquibase.serializer.core.jso
n.JsonChangeLogSerializer as a Liquibase service because org.yaml.snakeyaml.repr
esenter.Representer is not in the classpath
INFO 1/31/18 5:17 PM: liquibase: changelog.mysql.xml does not exist, creating
DEBUG 1/31/18 5:17 PM: liquibase: MissingObjectChangeGenerator type order: l
iquibase.structure.core.Catalog liquibase.structure.core.Schema liquibase.
structure.core.Sequence liquibase.structure.core.StoredProcedure liquibase
.structure.core.Table liquibase.structure.core.Column liquibase.structure.
core.PrimaryKey liquibase.structure.core.UniqueConstraint liquibase.struct
ure.core.Index liquibase.structure.core.ForeignKey liquibase.structure.cor
e.View
DEBUG 1/31/18 5:17 PM: liquibase: UnexpectedObjectChangeGenerator type order:
liquibase.structure.core.Catalog liquibase.structure.core.ForeignKey liq
uibase.structure.core.Schema liquibase.structure.core.StoredProcedure liqu
ibase.structure.core.UniqueConstraint liquibase.structure.core.View liquib
ase.structure.core.Table liquibase.structure.core.PrimaryKey liquibase.str
ucture.core.Column liquibase.structure.core.Index liquibase.structure.core
.Sequence
DEBUG 1/31/18 5:17 PM: liquibase: ChangedObjectChangeGenerator type order: l
iquibase.structure.core.Catalog liquibase.structure.core.ForeignKey liquib
ase.structure.core.Schema liquibase.structure.core.Sequence liquibase.stru
cture.core.StoredProcedure liquibase.structure.core.Table liquibase.struct
ure.core.Column liquibase.structure.core.PrimaryKey liquibase.structure.co
re.UniqueConstraint liquibase.structure.core.Index liquibase.structure.cor
e.View
Liquibase ‘generateChangeLog’ Successful