Open matijaSos opened 3 years ago
It is especially important to provide a good migration workflow and docs for production! Issue #215 is related to this.
User here mentioning having a bit hard time with db migrations: https://discord.com/channels/686873244791210014/1297209606749032491/1297796805836279879
eah I think we'd all benefit from a database migration document I'll work on writing something as well - I actually have been running into snags as well, for example I change something in my schema.prisma, i push to prod and expect the GitHub action to run the migration, but it doesn't pick the migration up. I've had to delete my app to pick up the migration, which is curious - I've looked at my logs and see there are conflicts, so maybe it is just my problem
While developing Waspello, at some point I wanted to migrate data in my db. I added
pos
field toList
entity so I wanted to assign a defaultpos
value to each existingList
, otherwise the changed schema wouldn't fit with the present data.I wasn't sure how to do it - should I connect to my Postgres db and do it from there, or write a script which uses Prisma SDK? I ended up deleting all the data and started fresh. But I would love to have a portion of the docs which explains the best practices and examples on this. We should make sure that we exposed everything that is necessary for developer to do this.