Refactor #1533

Re-Use Previous ID Values In Data Migration Script

Added by Pavan Rikhi 5 months ago. Updated 19 days ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Pavan Rikhi% Done:


Category:ScriptsSpent time:-
Target version:v0.11.0 - Pre-Migration Requirements
Easy Pickings:


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.

Associated revisions

Revision 481fef70
Added by Pavan Rikhi 19 days ago

[#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.

Closes #1533


#1 Updated by Pavan Rikhi 5 months ago

  • Subject changed from Re-Use Existing ID Values In Data Migration Script to Re-Use Previous ID Values In Data Migration Script

#2 Updated by Pavan Rikhi 22 days ago

  • Target version changed from v1.00.00 - Deployment to v0.11.0 - Pre-Migration Requirements

#3 Updated by Pavan Rikhi 19 days ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

Also available in: Atom PDF