.zh
PPrisma
•Created by .zh on 12/30/2024 in #help-and-questions
Executing data migration/data field seed script for a migration automatically
Meanwhile, can you advice on a solution that circumvents this problem?
8 replies
PPrisma
•Created by .zh on 12/30/2024 in #help-and-questions
Executing data migration/data field seed script for a migration automatically
Thank you, will do.
8 replies
PPrisma
•Created by .zh on 12/30/2024 in #help-and-questions
Executing data migration/data field seed script for a migration automatically
Thank you for the input. The thing is, the logic to seed the data is complex and can't be handled inside the sql, at least in this case.
8 replies
PPrisma
•Created by .zh on 12/30/2024 in #help-and-questions
Executing data migration/data field seed script for a migration automatically
The only viable solution I see currently is to store my data migration/seed script in the migration folder and instead of running the general
migrate dev/deploy
to introduce a custom migration handler that iterates over the migration files, checks which of them are not yet applied and running each of them separately by executing migrate dev/deploy --to <current-migration>
and the checking if there is a data migration script to execute before proceeding to the next migration. This, however, seems quite overwhelming for something so ordinary.8 replies