fix(drizzle): avoid runtime import in migration config
This commit is contained in:
@@ -1,12 +1,10 @@
|
|||||||
import { defineConfig } from 'drizzle-kit';
|
|
||||||
|
|
||||||
const databaseUrl = process.env.DATABASE_URL?.trim();
|
const databaseUrl = process.env.DATABASE_URL?.trim();
|
||||||
|
|
||||||
if (!databaseUrl) {
|
if (!databaseUrl) {
|
||||||
throw new Error('DATABASE_URL is required to run Drizzle migrations.');
|
throw new Error('DATABASE_URL is required to run Drizzle migrations.');
|
||||||
}
|
}
|
||||||
|
|
||||||
export default defineConfig({
|
export default {
|
||||||
schema: './lib/server/db/schema.ts',
|
schema: './lib/server/db/schema.ts',
|
||||||
out: './drizzle',
|
out: './drizzle',
|
||||||
dialect: 'postgresql',
|
dialect: 'postgresql',
|
||||||
@@ -15,4 +13,4 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
strict: true,
|
strict: true,
|
||||||
verbose: true
|
verbose: true
|
||||||
});
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user