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.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
allow reset w/o --dev & minor changes
Roman Pominov2d7bc834e3c1
diff --git a/packages/prisma-client/migrations-cli/README.md b/packages/prisma-client/migrations-cli/README.mdindex b2686cbd5c..f49d83c1b8 100644--- a/packages/prisma-client/migrations-cli/README.md+++ b/packages/prisma-client/migrations-cli/README.md@@ -33,6 +33,13 @@ In a TypeScript migration file, you can use a Prisma client generated specifical## Use cases+### How do I start using the new engine?++- Stop using `prisma migrate *` commands+- Start using `migrations *` commands instead++NOTE: If this becomes a library there should be more istructions here.+### How do I setup a new database for development?- Install Postgres and create a new database.@@ -61,8 +68,8 @@ In a TypeScript migration file, you can use a Prisma client generated specificalYou have several options:-1. If you have a backup of your database, you can restore it.-1. If you're in a dev environment, and you don't care about the data in the database, you can reset the database by running `migrations reset --dev`.+1. If you have a backup, you can restore it.+1. If you don't care about the data in the database, you can reset the database by running `migrations reset [--dev]`.1. Fix the issues manually.- Figure out what changes the migration managed to make to the database.- Revert the changes manually by any means you like. E.g. using a Postgres client.@@ -81,8 +88,7 @@ You have several options:This flag can be added to any command. It informs the CLI that it’s used in a development environment, which slightly changes its behaviour:- automatically loads variables from `.env` files,-- uses a lockfile to avoid running more than one migration process at the same time,-- allows resetting the database using the `reset` command.+- uses a lockfile to avoid running more than one migration process at the same time.### `--skip-confirmation`@@ -112,7 +118,7 @@ Applies all pending migrations. Looks for migrations in the migrations directoryExample: `$ migrations reset`-Deletes all data from the database, and applies all migrations again. Works only with the `--dev` flag.+Deletes all data from the database, and applies all migrations again.### `status`diff --git a/packages/prisma-client/migrations-cli/commands.ts b/packages/prisma-client/migrations-cli/commands.tsindex 68d2527b82..7d692ed5b6 100644--- a/packages/prisma-client/migrations-cli/commands.ts+++ b/packages/prisma-client/migrations-cli/commands.ts@@ -357,15 +357,9 @@ export const resolve = async ({export const reset = async () => {// just to make it read the migrations folder- // and fail early if something is wrong with the migration files+ // and fail early if something is wrong with it.await getStatus();- if (args.dev === false) {- throw new UserError(- "This command is only available in dev mode. Try again with --dev."- );- }-logger.info("You're about to DELETE ALL INFORMATION from the database,");logger.info("and run all migrations from scratch!");logger.info("");