Applies pending migrations to the shadow database (for example, new migrations created by colleagues).Reruns the existing migration history in the shadow database in order to detect schema drift (edited or deleted migration file, or a manual changes to the database schema).migrate devįor use in development environments only, requires shadow database Instead of migrate dev and related commands, db push is used for MongoDB. Prisma Migrate changed from Preview to Generally Available (GA) in 2.19.0. $ echo 'TRUNCATE TABLE dev ' | prisma db execute -stdin -url="$DATABASE_URL" Migration troubleshooting in productionīefore using the db execute command, if you do not use the -url option you must define a valid datasource within your schema.prisma file.įor example, the following datasource defines a SQLite database file within the current directory:.The output of the command is connector-specific, and is not meant for returning data, but only to report success or failure. the data source, which can either be the URL of the data source or the path to your Prisma schema file.the SQL script, which can be provided either on standard input or in a file.This command applies a SQL script to the database without interacting with the Prisma migrations table. This command is currently not supported on MongoDB. If you're using a version between 3.9.0 and 3.13.0, it is available behind a -preview-feature CLI flag. The db execute command is Generally Available in versions 3.13.0 and later.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |