mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 17:15:37 +01:00
Remove prisma dir before copying files.
This commit is contained in:
parent
60ab144fc2
commit
3c1308890a
1 changed files with 3 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
require('dotenv').config();
|
require('dotenv').config();
|
||||||
const fse = require('fs-extra');
|
const fse = require('fs-extra');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const del = require('del');
|
||||||
|
|
||||||
function getDatabaseType() {
|
function getDatabaseType() {
|
||||||
const type =
|
const type =
|
||||||
|
|
@ -25,6 +26,8 @@ console.log(`Database type detected: ${databaseType}`);
|
||||||
const src = path.resolve(__dirname, `../db/${databaseType}`);
|
const src = path.resolve(__dirname, `../db/${databaseType}`);
|
||||||
const dest = path.resolve(__dirname, '../prisma');
|
const dest = path.resolve(__dirname, '../prisma');
|
||||||
|
|
||||||
|
del.sync(dest);
|
||||||
|
|
||||||
fse.copySync(src, dest);
|
fse.copySync(src, dest);
|
||||||
|
|
||||||
console.log(`Copied ${src} to ${dest}`);
|
console.log(`Copied ${src} to ${dest}`);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue