add pricing feature
This commit is contained in:
@@ -3,7 +3,11 @@
|
||||
const { spawnSync } = require('node:child_process')
|
||||
const { readdirSync } = require('node:fs')
|
||||
const path = require('node:path')
|
||||
const { ensureDatabaseUrl } = require('../src/runtime-config')
|
||||
const {
|
||||
ensureDatabaseUrl,
|
||||
loadDefaultEnvFiles,
|
||||
normalizeDatabaseUrlForExecution,
|
||||
} = require('../src/runtime-config')
|
||||
const { PrismaClient } = require('../generated')
|
||||
|
||||
const repoRoot = path.resolve(__dirname, '../../..')
|
||||
@@ -24,7 +28,9 @@ function run(command, args) {
|
||||
}
|
||||
|
||||
async function main() {
|
||||
loadDefaultEnvFiles(repoRoot)
|
||||
ensureDatabaseUrl()
|
||||
normalizeDatabaseUrlForExecution()
|
||||
const prisma = new PrismaClient()
|
||||
|
||||
try {
|
||||
@@ -103,6 +109,9 @@ async function main() {
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
if (error?.message?.includes("Can't reach database server at `localhost:5432`")) {
|
||||
console.error('[db:deploy] Hint: start the local Postgres service first. In this repo that is usually `docker compose -f docker-compose.dev.yml up -d postgres`.')
|
||||
}
|
||||
console.error('[db:deploy] Failed:', error)
|
||||
process.exit(1)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user