Skip to content

Phinx migrations

Matthias Larisch requested to merge phinx-migrations into master

What does this MR do?

Introduce phinx to manage database migrations. This offers better control over the dev/test database in the future as the application knows and tracks the state your db is in. It is not planned to use it in production yet/soon, as we still have the problem of keeping compatibility with beta and production. Still, this gives us possibilities in that direction as well.

Database structure has been synced with production and been completely rewritten in a phinx-compatible format. Static data has been avoided as much as easily possible, this includes a set of updates to our tests that were (and still are in parts) relying on static data.

In the process of selecting the necessary static data, some smaller annoyances in the code have been cleaned up to depend less on certain data.

It also fixes pre-selection of store region so a person having Stammbezirk a "part of town" region now also has this preselected (a broken test because of changed test data discovered this :-) )

How confident are you it won't break things if deployed?

The changes outside of tests and dev/test/ci database are tiny - so yep, I think it's fine.

How to test

Steps a reviewer can take to verify that this MR does what it says it does e.g.

  1. Checkout branch locally
  2. run ./scripts/start or ./scripts/test - you'll see phinx being used for migrating the database.

Checklist

  • added a test, or explain why one is not needed/possible...
  • [o] no unrelated changes
  • asked someone for a code review
  • joined #foodsharing-beta channel at https://slackin.yunity.org
  • added an entry to CHANGELOG.md (description, merge request link, username(s))
  • Once your MR has been merged, you are responsible to update the #foodsharing-beta Slack channel about what has been changed here. They will test your work in different browsers, roles or other settings
Edited by Christian Walgenbach

Merge request reports