Skip to content
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

Migrate more variants of databases #4049

Closed

Conversation

matthias-ronge
Copy link
Collaborator

@matthias-ronge matthias-ronge commented Oct 13, 2020

We had to make these adjustments as part of the migration workshop so that the database in the example could be migrated.

@matthias-ronge
Copy link
Collaborator Author

Hi @Kathrin-Huber, we have to migrate another system tomorrow. Could you merge these fixes today? Then we could use the official version.

@henning-gerhardt
Copy link
Collaborator

I migrated many times our big database and your proposed changes are not needed. If this changes go in, I need to migrate our database again as we use flyway to migrate our database. In the past I was me told not to change released migration files.

@matthias-ronge
Copy link
Collaborator Author

There are databases where these changes are necessary, or migration fails. You may consider this as as “messy” 2.x databases, and if the migration worked for you, you don’t have to migrate your database again, as these changes will not result in any changes with your database. Everybody is using Flyway to migrate databases, so this argument doesn’t count.
I am not happy that we need to fix released migration files, but these changes do some clean-up which is necessary to migrate the one or other 2.x database which contains messy data. So this cannot be done later as migration will fail with an error it these changes aren’t run before the migration.

@henning-gerhardt
Copy link
Collaborator

What about fixing the 2.x database before you start migration? I must do this even as our database is even old and messed up (wrong engine, collation, additional tables, additional views, ...).

@matthias-ronge
Copy link
Collaborator Author

I cannot do this anymore now. We did run these chanegs in between in places wehere migration failed when doing the migration workshop which was part of the development project last year, and this PR is part of the documentation. I don’t know if running these commands as-is before the migration is the same.

@henning-gerhardt
Copy link
Collaborator

If the old migration files already applied to this database then your suggested changes would not be applied anymore by flyway. So you must do this in a manual way.

I don't know how it was possible to add template processes some kind of properties in 2.x. The only way I can image is to change a normal process to a process template but who - in hell - is doing this?

@matthias-ronge
Copy link
Collaborator Author

Yes, we are talking about any “new” 2.x databases that need to be migrated. This change is uninteresting for any database that already have been migrated successfully.

@henning-gerhardt
Copy link
Collaborator

Good thing is: our current productive 2.x database has not any kind of such wrong data - if I translated correct your additional delete statements to select statements of 2.x. So any migration in future should hopefully not be affected and I will refuse any kind of change of existing processes to process templates.

Question is or remain: should the migration support any kind of messed up 2.x databases? I don't think so.

@Kathrin-Huber
Copy link
Contributor

Sorry I'm not going to change flyway migrations if not inevitable.
Databases in a wrong structure must be cleaned-up beforehand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants