Import source: app/backend/scripts/apply-schema.mjs

Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality.
This commit is contained in:
arsam
2026-09-18 23:19:03 +03:30
parent bea68ad59b
commit 97211e16d9
+10
View File
@@ -0,0 +1,10 @@
import { existsSync } from 'node:fs';
import { spawnSync } from 'node:child_process';
const hasMigrations = existsSync(new URL('../prisma/migrations', import.meta.url));
const args = hasMigrations
? ['prisma', 'migrate', 'deploy']
: ['prisma', 'db', 'push', '--skip-generate'];
const result = spawnSync('npx', args, { stdio: 'inherit', shell: process.platform === 'win32' });
process.exit(result.status ?? 1);