<@ULP250DRT> if you're rethinking migrations, here...
# prisma-migrate
b
@janpio if you're rethinking migrations, here's a question about best practise. How would someone do a deploy? You don't want to migrate while still running the old code, because it could crash. On the other hand, you don't want to deploy new code and migrate after that, because of the same reason 🙂 I thought about one possible solution. Imagine if there's a pre-deploy migration where it would do all the non-destructive migration step such as adding tables/column. And then there's a post-deploy migration step where it would delete old columns, copy date from an old column to a new one (in case you have renamed a column) etc
h
Yes, that’s described as a Parallel change pattern
👍 1
b
Cool, thanks! Will read it first thing in the morning tomorrow :)
🦜 1
j
Indeed by doing multiple migrations
h
The typical example is that you keep the old columns / models, while adding the new, with your app evolving to use the new ones. Once the deployment (and all users!) have adopted the new version and you know you can safely delete the old-and-now-unsued columns or models, then you can run another migration to clean these up.
💯 3