mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 08:07:12 +01:00
New build process.
This commit is contained in:
parent
c3da37c0b0
commit
551959562e
4 changed files with 99 additions and 28 deletions
14
scripts/copy-db-schema.js
Normal file
14
scripts/copy-db-schema.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
require('dotenv').config();
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const db = process.env.DATABASE_URL.split(':')[0];
|
||||
|
||||
if (!db) {
|
||||
throw new Error('Database not specified');
|
||||
}
|
||||
|
||||
const src = path.resolve(__dirname, `../prisma/schema.${db}.prisma`);
|
||||
const dest = path.resolve(__dirname, '../prisma/schema.prisma');
|
||||
|
||||
fs.copyFileSync(src, dest);
|
||||
Loading…
Add table
Add a link
Reference in a new issue