You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Feature:
Provide a way to bypass the check CREATE SCHEMA IF NOT EXISTS ${sql.identifier(migrationsSchema)}
when the default "public" schema is used in Postgres with
Reason:
It is possible that in high regulated environments the user executing the migration doesn't have the permissions for any operation on the schema, even checking if it exists (this is the reason why we use "public" in the first place).
The above statement will trigger an error "permission denied" and abort the entire migration.
Feature hasn't been suggested before.
Describe the enhancement you want to request
Feature:
Provide a way to bypass the check
CREATE SCHEMA IF NOT EXISTS ${sql.identifier(migrationsSchema)}
when the default "public" schema is used in Postgres with
Reason:
It is possible that in high regulated environments the user executing the migration doesn't have the permissions for any operation on the schema, even checking if it exists (this is the reason why we use "public" in the first place).
The above statement will trigger an error "permission denied" and abort the entire migration.
It should be quite easy just changing
drizzle-orm/drizzle-orm/src/pg-core/dialect.ts
Line 85 in 30e5347
with
The
public
schema should exists by default in Postgres https://www.postgresql.org/docs/current/ddl-schemas.html#DDL-SCHEMAS-PUBLICI can create a PR for it if you're happy with the approach.
The text was updated successfully, but these errors were encountered: