schema.prismawithout creating migrations, the update to the newer database schema can damage or delete all data in production mode, since the system sometimes doesn't know how to transform the data from A to B. Using migrations, each step is reproducable, transparent and can be undone in a simple way.
schema.prismafile, you must create a migration.
schema.prisma, simply run the following:
_prisma_migrationsto keep track of which migrations have been applied and which haven't. If your local migrations database doesn't match up with what's in the actual database, then Prisma will throw the following error:
migration_namewith each migration that you have already applied: