Skip to content

Commit

Permalink
chore(migrate error): tweak CockroachDB - PostgreSQL provider error (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolg42 committed Jul 10, 2023
1 parent 5f09abe commit 6b0aef6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/user-facing-errors/src/schema_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ impl crate::UserFacingError for ProviderSwitchedError {
let expected_provider = &self.expected_provider;

match (provider.as_str(), expected_provider.as_str()) {
("cockroachdb", "postgresql") => format!("The datasource provider `{provider}` specified in your schema does not match the one specified in the migration_lock.toml, `{expected_provider}`. If the database you have been using with the existing migrations is CockroachDB and you are switching from `postgresql` to `cockroachdb` provider in the schema as instructed by another error message by Prisma, then you can safely change the saved provider in the `migration_lock.toml` file in the migrations directory. Your migration history and your data will stay intact. Otherwise, if you are switching from a PostgreSQL database to a CockroachDB database, please remove your current migration directory and start a new migration history with prisma migrate dev. Read more: https://pris.ly/d/migrate-provider-switch"),
("cockroachdb", "postgresql") => format!("The datasource provider `{provider}` specified in your schema does not match the one specified in the migration_lock.toml, `{expected_provider}`. Check out the following documentation for how to resolve this: https://pris.ly/d/cockroachdb-postgresql-provider"),
_ => format!("The datasource provider `{provider}` specified in your schema does not match the one specified in the migration_lock.toml, `{expected_provider}`. Please remove your current migration directory and start a new migration history with prisma migrate dev. Read more: https://pris.ly/d/migrate-provider-switch")
}
}
Expand Down

0 comments on commit 6b0aef6

Please sign in to comment.