-
Notifications
You must be signed in to change notification settings - Fork 3
Run Changes
If you choose not to run Firefly automatically, you can trigger it via ant.
- Use the
firefly-update
target to start the upgrade. - To see the upcoming changes to your database use the ant
firefly-simulate
target. - To update the database to the currently installed migration use the ant
firefly-baseline
target.
During development you may want to apply the changes without using ant or restarting the server. To this end, you can utilize the hAC groovy console.
ctx.getBean('fireflyService').migrate()
println 'done'
println ctx.getBean('fireflyService').simulate()
ctx.getBean('fireflyService').baseline()
println 'done'
If you use the println
command in a groovy change, the result will be added to you log file automatically while the script is running. This is useful if you have some changes that take a while and want to follow the progress.
Every change is commited automatically. So you should not use a commit
within a change.
Also keep in mind, that most DB systems (like oracle) perform a auto commit after a DDL (Data Definition Language) command. So you chould create separate changes for those type of commands. This way, Firefly can resume the update even if one command fails.