-
Notifications
You must be signed in to change notification settings - Fork 48
Alternative default code for migration new fields & latest translated strings #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fixes #1021 "Missing field code in v2.1=>v2.2 migration new fields creation"
|
I would like not to change already merged migration files to prevent database mess. Can you revert and introduce a new migration file that do only the changes you want? (I guess you will have to redefine the entire |
|
Thanks for this feedback. |
|
I understand your point but it won't work. Flyway has a strong rule: migration already passed should not be modified: the migration process check all files integrity when booting (via checksum) and will crash everything telling the developer to fix the files. I guess we will have support to do on the mailing-list... people will have to flyway:repair. Adding a new migration file is simple and straightforward and won't raise any failure on the developer side. Actually, flyway migrations are suitable for physical schema changes but dealing with procedures as its own mechanism in Flyway 4 (we use v3) called repeatable migration that is made for that: it allows you to do things like 1 procedure = 1 file and flyway will detect the file change and re-create the procedure if changed. I think we don't have many procedure so it's not necessary for now... and we lack experiences with that feature so not sure if there is not drawbacks I can't think of. |
|
I have followed your suggestion, and created a V17 in flyway dir for this new version of the procedure. I have also added the latest translations. |
|
Hi @numero-six : flyway-migrate is making this build fail. |
|
Hi @osarrat I'm confused... You procedure seems fine to me but it seems that the Can you try a workaround? Just add DROP TABLE IF EXISTS tmp_migrate_budget_field;just before the |
Commit fixes #1021 in a way which is compatible with former flyway compatible commit. Flyway doesn't seem to like Postgres temporary table.
|
Thanks @numero-six for your tip ! It builds now ! |
fixes #1021 "Missing field code in v2.1=>v2.2 migration new fields creation"