fix(database): use public schema for drizzle migrations to avoid permission error
PostgreSQL error 42501 when Drizzle tries CREATE SCHEMA IF NOT EXISTS "drizzle" — the DB user lacks schema creation privileges. Configuring migrationsSchema: "public" keeps __drizzle_migrations in the existing public schema, matching what seedDrizzleHistory already expects. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
8b114ca278
commit
378f1b6bdc
@@ -139,6 +139,7 @@ export async function runMigrations(): Promise<void> {
|
||||
|
||||
await migratePostgres(db, {
|
||||
migrationsFolder: "./drizzle/migrations",
|
||||
migrationsSchema: "public",
|
||||
});
|
||||
} finally {
|
||||
await client.query("SELECT pg_advisory_unlock($1, $2)", [
|
||||
|
||||
Reference in New Issue
Block a user