Change models and write database migrations #3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Don't screw up historical data
changed milestone to %1
assigned to @midgard
changed title from {-W-}rite database migrations to {+Change models and w+}rite database migrations
Models have been changed. Database migration writing in progress.
To ensure that no data is lost, I did the following.
Check that orders that had a location, still do
The migration first renames location_id to legacy_location_id and then populates a new location_id with the HLDS IDs. I temporarily disabled the DROP COLUMN legacy_location_id in the migration, and ran these queries:
The second query is to visually confirm the findings of the first.
We conclude that indeed, there are no orders where we are losing information about which location the order was for. Good!
Check that order_items that had a product, have a dish now
We do a similar thing for order_items and their products (old term) / dishes (new term)
All good!
The dish IDs will have to be checked in the future, when #23 is done. The same query can be used, just change dish_name to dish_id.
mentioned in issue #23
Done in b1d0c3e00466309c6d940410759619b3ffe214d8!
closed