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:
Nguyen Thanh Quang 2021-11-28 05:39:57 +07:00 committed by GitHub
parent 8e8bfd68d1
commit 1b78ffaa91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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');