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

Re : How to handle database changes made by an automatic upgrade script?

$
0
0
Thank you!

If I would use diffChangelog, I assume I would need to compare the updated database to its previous state, and I would also need to mark the changeSets as if liquibase already applied them to the database. How would I do that?

Nathan Voxland replied on stackoverflow:
The easiest way is to use the changeLogSync or changeLogSync command to to mark them as ran. Or you can manually insert into databasechangelog
Is there additional method, except changeLogSync 

With that and after some googling, I believe I have to do something like that, but But I am absolutely unfamiliar with Liquibase so I'm asking if that is right?
duplicate dev_database to backup_database
run wordpress upgrade script (modify dev_database)
# liquibase --url=".../dev_database" --changeLogFile="path/to/db.changelog.xml" diffChangeLog --referenceUrl=".../backup_database"
# liquibase --url=".../dev_database" --changeLogFile="path/to/db.changelog.xml" changeLogSync
include the generated db.chengelog.xml in the main changelog
drop backup_databas
Is that right? 
Can I use diffChangeLog without duplicating the database (maybe with the tag command)? 

Thanks a lot!

Viewing all articles
Browse latest Browse all 2993

Trending Articles



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