mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +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();
|
||||
const fse = require('fs-extra');
|
||||
const path = require('path');
|
||||
const del = require('del');
|
||||
|
||||
function getDatabaseType() {
|
||||
const type =
|
||||
|
|
@ -25,6 +26,8 @@ console.log(`Database type detected: ${databaseType}`);
|
|||
const src = path.resolve(__dirname, `../db/${databaseType}`);
|
||||
const dest = path.resolve(__dirname, '../prisma');
|
||||
|
||||
del.sync(dest);
|
||||
|
||||
fse.copySync(src, dest);
|
||||
|
||||
console.log(`Copied ${src} to ${dest}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue