I've written a bunch of migration script to migrate a site from Drupal 6 to Drupal 8.
On the development server I just ran a sample of each content type migration to test everything was OK while new content was still being created on production server on a daily basis by redactors.
During the validation time by the project team (which could take several weeks), I'll run migration everyday on a fresh database dump from production server. During that time also, the project team will need to create specific new content (content that is not being migrated) for different purposes, like testing brand new content type or creating specific base pages needed by the new site templates.
Since the migration process keeps the original ID, I need to find a way for new content to be created without taking the node ID from a node created on the production server. I’ve not been able to find any information about that case (which is quite a common case, I think) in the Drupal migration literature.
My first idea would be to change auto_increment value in relevant tables adding (let’s say) 100.000 to the current value, that way there wouldn’t be any collision between newly created content and the ones created the day before on production server. A brief look to the Drupal 8 database schema gave me the following tables and fields to alter:
- file_managed => fid
- node => nid
- node_revision => vid
- url_alias => pid
I am not sure the file managed fid field is kept during migration process; the same is true for the URL alias pid field since the link is made on the source field.
Do you think it would be enough to alter only the node and node_revision tables?
I also noticed a sequences table with a single value field with only one row. As far as I've read about this table, I've not really been able to figure out what it is used for. Maybe some of you can explain me and tell me if it's important regarding my issue.
Do you this is a correct approach? Are there other tables that could need to be altered?