fix(prisma): make sure migrations are migrated in the first run (#105)
* fix(prisma): make sure migrations are migrated in the first run * chore: removed redundant parentheses
This commit is contained in:
parent
8e8bfd68d1
commit
1b78ffaa91
1 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,7 @@ function shouldUseYarn() {
|
|||
const config = await validateConfig(a);
|
||||
|
||||
const data = await prismaRun(config.core.database_url, ['migrate', 'status'], true);
|
||||
if (data.includes('Following migrations have not yet been applied:')) {
|
||||
if (data.match(/Following migrations? have not yet been applied/)) {
|
||||
Logger.get('database').info('some migrations are not applied, applying them now...');
|
||||
await deployDb(config);
|
||||
Logger.get('database').info('finished applying migrations');
|
||||
|
@ -135,4 +135,4 @@ function shouldUseYarn() {
|
|||
process.exit(1);
|
||||
}
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
|
Loading…
Reference in a new issue