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

[57990] Make migration work with database from before 14.0 version #16820

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

cbliard
Copy link
Member

@cbliard cbliard commented Sep 26, 2024

Ticket

https://community.openproject.org/wp/57990

What are you trying to accomplish?

  • Fix migration not working for databases before 14.0 version
  • Link to the newest blog article about progress values migration

What approach did you choose and why?

The code to create the temporary table in common between the migration and the job to update status and % complete values. It has recently changed to get the excluded_from_totals value from the statuses table, but this field has been created in 14.2, and does not exist yet in 14.0 when this migration is run.

This commit adds the previous version of the code to create the temporary table, that does not require the excluded_from_totals field. It also avoids creating the depths table which is not necessary in this case.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@cbliard cbliard marked this pull request as ready for review September 26, 2024 10:09
@oliverguenther
Copy link
Member

@cbliard this should be rebased to 14.6

@cbliard
Copy link
Member Author

cbliard commented Sep 26, 2024

@cbliard this should be rebased to 14.6

I think I'll always make that mistake.
I'll check why the "Check work package version" did not warn me.

EDIT: well it did, but I did not see it.

https://community.openproject.org/wp/57990

The code to create the temporary table in common between the migration
and the job to update status and % complete values. It has recently
changed to get the `excluded_from_totals` value from the `statuses`
table, but this field has been created in 14.2, and does not exist yet
in 14.0 when this migration is run.

This commit adds the previous version of the code to create the
temporary table, that does not require the `excluded_from_totals` field.
It also avoids creating the depths table which is not necessary in this
case.
@cbliard cbliard force-pushed the fix/make-progress-migration-work-before-14-0 branch from caca6a3 to 775a526 Compare September 26, 2024 13:12
@cbliard cbliard changed the base branch from dev to release/14.6 September 26, 2024 13:12
@cbliard cbliard merged commit 2e092c2 into release/14.6 Sep 26, 2024
15 checks passed
@cbliard cbliard deleted the fix/make-progress-migration-work-before-14-0 branch September 26, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants