This project is read-only.

Is it possible to add data with a migration?

Topics: Core
Jun 12, 2015 at 5:40 PM
We are creating tables on application startup in a class that inherits DataMigrationImpl.

After creating tables (calling SchemaBuilder.CreateTable), is it possible to add custom data to our new tables using methods from DataMigrationImpl or otherwise?

If this is not possible, what is the correct way to achieve this?
Jun 24, 2015 at 2:44 PM
yes, many samples in custom modules, search gallery
Jun 25, 2015 at 5:49 PM
It's not necessarily best practice however. Data creation is best done in a recipe. Migrations should in principle deal with schema changes, not data creation.
Jul 2, 2015 at 3:00 PM
Thanks for the replies, we just ended up using the import module.