create config if it's not there
This commit is contained in:
parent
a9814fd150
commit
529f68360d
1 changed files with 5 additions and 1 deletions
|
|
@ -1,8 +1,12 @@
|
||||||
const { execSync, spawn } = require('child_process');
|
const { execSync, spawn } = require('child_process');
|
||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
console.log(`Running migrations`);
|
console.log(`Running migrations`);
|
||||||
execSync(`mkdir config`);
|
// check if config folder exists
|
||||||
|
if (!fs.existsSync('./config')) {
|
||||||
|
execSync(`mkdir config`);
|
||||||
|
}
|
||||||
execSync('npm run prisma:migrate');
|
execSync('npm run prisma:migrate');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue