Skip to content

Commit 8a97b5a

Browse files
committed
chore: use get config in migrate call script
1 parent 1833230 commit 8a97b5a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/scripts/migrate-call.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import dotenv from 'dotenv'
22
dotenv.config()
33

4-
import { runMigrationsOnTenant } from '@internal/database/migrations'
4+
import { getConfig, runMigrationsOnTenant } from '@internal/database/migrations'
55
;(async () => {
6+
const { databaseURL, dbMigrationFreezeAt } = getConfig()
67
await runMigrationsOnTenant({
7-
databaseUrl: process.env.DATABASE_URL as string,
8-
upToMigration: process.env.DB_MIGRATIONS_FREEZE_AT,
8+
databaseUrl: databaseURL,
9+
upToMigration: dbMigrationFreezeAt,
910
})
1011
})()

0 commit comments

Comments
 (0)