Separate Schema & Data Migrations In Rails
Avoid data migrations in schema migrations for Rails. Separate schema & data changes. Use migrations only for schema updates, one-off tasks for data seeding/transforming/importing.
Avoid data migrations in the schema migrations for Rails Could you re-run all migrations in the project? How often were you required to fix them while production was under fire? What can you do to prevent problems with migration and not waste much time on it? Solution Do not mess with schema and data migrations! Separate those problems. There is a pretty common strategy for this: Use migrations only for schema changes. Use one-off tasks to seed, transform, or import data. Drop outdated migrations and join redundant tasks into efficient workflows. How can you onboard it?...