How to schema migrate a type that has seed data?


If I have type A that has seed data and I want to make type A extend type B.
The problem is type A has seed data that gets created before the schema migration script is ran.
How do I resolve?


You must both:

  1. manually migrate the seed data in the seed/ directory (e.g. reformat them so they look like the new data)
  2. write a schema migration to replicate all user edits which have taken place in your seed data to the new format


Riley is correct. In addition, if type A was extendable, had a type key, and was the base extendable type (e.g. it didn’t extend anything), then you could call SchemaMigrationCommon.insertNewBaseType to migrate the data. If any of the above is not true then it would require SQL or we would have to add a new function to SchemaMigrationCommon.