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();
|
||||
|
||||
if (!databaseUrl) {
|
||||
throw new Error('DATABASE_URL is required to run Drizzle migrations.');
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
export default {
|
||||
schema: './lib/server/db/schema.ts',
|
||||
out: './drizzle',
|
||||
dialect: 'postgresql',
|
||||
@@ -15,4 +13,4 @@ export default defineConfig({
|
||||
},
|
||||
strict: true,
|
||||
verbose: true
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user