Liquibase - how to generate a changelog for existing database

后端 未结 2 524
不知归路
不知归路 2020-12-15 23:24

I\'m trying to use liquibase for generating the changeLog, starting by snapshoting the current state of my database.

Environment details:

  • OS: Windows 7
2条回答
  •  萌比男神i
    2020-12-16 00:12

    I had faced similar issue when generating changelog xml for postgresql database. I'm posting here if it can help someone. I had to specify --defaultSchemaName in addition to the above params. So in mysql you will have similar option:

    The final command will look like :

    liquibase --driver=org.postgresql.Driver --changeLogFile=db.changelog.xml  --classpath=postgresql-9.4-1201-jdbc41.jar --url="jdbc:postgresql://localhost:5432/wms"  --username= --password= --defaultSchemaName= generateChangeLog   
    

提交回复
热议问题