Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

no confirmation when applying migr. in production

Roman Pominovd29330622dc2
diff --git a/packages/prisma-client/migrations-cli/README.md b/packages/prisma-client/migrations-cli/README.md
index 9716c5d193..31b232549f 100644
--- a/packages/prisma-client/migrations-cli/README.md
+++ b/packages/prisma-client/migrations-cli/README.md
@@ -6,6 +6,7 @@ This flag can be added to any command. It informs the CLI that it’s used in a
- automatically loads variables from `.env` files,
- uses a lockfile,
+- asks for confirmation before applying migrations,
- allows resetting the database using the `reset` command.
### `create-schema <name>`
diff --git a/packages/prisma-client/migrations-cli/commands.ts b/packages/prisma-client/migrations-cli/commands.ts
index 55bcf48028..0055666f26 100644
--- a/packages/prisma-client/migrations-cli/commands.ts
+++ b/packages/prisma-client/migrations-cli/commands.ts
@@ -286,14 +286,15 @@ export const migrate = async () => {
process.exit(0);
}
- logger.info("You're about to apply the following migration(s):");
- logger.info("");
- for (const migration of status.pending) {
- logger.info(` - ${migration.name}`);
+ if (args.dev) {
+ logger.info("You're about to apply the following migration(s):");
+ logger.info("");
+ for (const migration of status.pending) {
+ logger.info(` - ${migration.name}`);
+ }
+ logger.info("");
+ await ensureUserWantiToContinue(true);
}
- logger.info("");
-
- await ensureUserWantiToContinue(true);
await up();
};