Re-Use Previous ID Values In Data Migration Script
|Assignee:||Pavan Rikhi||% Done:|
|Target version:||v0.11.0 - Pre-Migration Requirements|
The database migration script should insert rows by specifying their ID instead of relying on the autoincrementing counter.
This will keep Order numbers in line with the old website, and make redirecting old links easier. E.g., we can regex the ezpage URLs(which have their ID in the URI) and redirect them to something like
/api/pages/<id>/ which will then pull the slug and then redirect to the new URL.
[#1533] Ensure Migrated Data Retains It's ID Number
Modify the DataMigration script so that the Category, Product, Pages,
Customers, & Orders retain their old ID values. This simplifies the
insertions, reduces the number of ID Maps we needs to build, and lets us
redirect old URLs to the new URLs.
Note that the `insertKey` function from Persistent does not update the
ID sequence for the table, so after migrating the data the script will
set the ID sequence value so the maximum ID for the table.