NOTE: This is a technical subticket of T390611: Extract Donor data into tables.
Acceptance criteria
- We have a migration that creates the tables, relations, indexes and relationship column in the spenden table introduced in T390618: Write Donor entities when saving donation
Implementation Notes
- This should be branched off the changes in T390618: Write Donor entities when saving donation
- You can test the migration like this:
- Change the fundraising-donation dependency in composer.json to the migration branch
- Change the FunFunFactory to match the new dependencies
- Try creating a donation. It should fail because of the missing tables
- Run run the migration in your local environment.
- Try creating a donation again. It should succeeed and the data should show up in the new tables
- Try out other donation types. It should succeeed and the data should show up in the new tables
- Try out the scrubbing script for donations. it should succeed and delete the old entries, replacing them with scrubbed donors
- If the migration does not work, do the following steps:
- Update the migration branch (with force-push)
- Update dependencies with make update-php to get the newest release
- Drop the database with docker compose down -v
- Start the environment
- Run the migration again
DO NOT regenerate the SQL with make generate-database-schema! That would make the the migration impossible. Regenerating the schema in the local environment is part of T369160: Change Fundraising Application to support individual street name and house number fields