Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T113249 [WMDE-Fundraising] Epic: Rewrite of frontend | |||
Resolved | gabriel-wmde | T123055 Investigate of old data must be migrated |
Event Timeline
At the moment it looks like we won't have many changes to the DB schema that would justify the complexity of this task. I'd propose we drastically reduce the complexity of this task (to 5), add comments comments here if we make changes to the DB and how to (manually) incorporate those changes into an existing database.
Fundraising Store 2.0: Changed date fields in donation and added a subscription table. Removed GUID from membership table.
Migration SQL can be generated with the command
vendor/bin/doctrine orm:schema-tool:update
Do we actually need this for the first demo version? If so, we ought to get to it. I want to help with this, though am not sure what exactly needs doing, where the existing db is, etc.
I did this for the test database and the updates went through without a hitch. We still need to check if the test-backend broke or not.
We need to make sure that the data is retained when applying changes and (as @gabriel-wmde already stated) that the "backend application" still works.
Tested the migration on in the test database with all the data. Took 8 minutes, but had no errors:
mysql> ALTER TABLE spenden CHANGE dt_new dt_new DATETIME NOT NULL; Query OK, 1765420 rows affected (7 min 27.92 sec) Records: 1765420 Duplicates: 0 Warnings: 0 mysql> ALTER TABLE request DROP type, DROP guid, CHANGE timestamp timestamp DATETIME NOT NULL, CHANGE dob dob DATE DEFAULT NULL; Query OK, 17801 rows affected (0.48 sec) Records: 17801 Duplicates: 0 Warnings: 0
Adjusted the store and the backend to the new schema:
https://github.com/wmde/FundraisingStore/pull/83
https://github.com/wmde/fundraising-backend/pull/201
please review