.zh
PPrisma
•Created by .zh on 12/30/2024 in #help-and-questions
Executing data migration/data field seed script for a migration automatically
No, not at this point. I've looked for a while but didn't find anything that covers my requirements. So, either a custom migration handler or the old "1-2-3" for a single db change.
13 replies
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?
13 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.
13 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.
13 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.13 replies