feat: migrate legacy long-lived database records
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import 'dotenv/config';
|
||||
|
||||
import { defineConfig } from 'prisma/config';
|
||||
|
||||
const databaseUrl = process.env.GATEWAY_DATABASE_URL ?? process.env.DATABASE_URL;
|
||||
if (!databaseUrl) {
|
||||
throw new Error('GATEWAY_DATABASE_URL or DATABASE_URL is required for gateway migrations.');
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
schema: 'prisma/gateway.prisma',
|
||||
migrations: {
|
||||
path: 'prisma/gateway-migrations',
|
||||
},
|
||||
datasource: {
|
||||
url: databaseUrl,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user