Ideally, we would want to modify our database going forward by generating Prisma migrations and allowing our CI/CD pipeline (GitHub actions) to then run these migrations to update the database.
What this would mean -
Changes to the DB are code reviewed before being made
Changes are reversible via down migrations
No manual SQL being run locally to change DB structure
Prisma schema always in sync with DB
@gabrielegranello I have tried and miserably failed this task. I think I have got the logic of why we do this. I was also able to setup PRISMA and then run an initial migration (after pulling the current schema). Then, I tried to run a second migration so specify NOT NULL in some of the columns but I encountered a message similar to : if proceed data will be deleted, so I cancelled and stop. Very much looking forward to learn how to do without destroying the database
Ideally, we would want to modify our database going forward by generating Prisma migrations and allowing our CI/CD pipeline (GitHub actions) to then run these migrations to update the database.
What this would mean -
@gabrielegranello I have tried and miserably failed this task. I think I have got the logic of why we do this. I was also able to setup PRISMA and then run an initial migration (after pulling the current schema). Then, I tried to run a second migration so specify NOT NULL in some of the columns but I encountered a message similar to : if proceed data will be deleted, so I cancelled and stop. Very much looking forward to learn how to do without destroying the database