mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 15:47:13 +01:00
add console log. look for 01 last applied
This commit is contained in:
parent
5873a56fff
commit
b426bbd812
1 changed files with 4 additions and 1 deletions
|
|
@ -63,8 +63,11 @@ async function run(cmd, args) {
|
||||||
async function checkMigrations() {
|
async function checkMigrations() {
|
||||||
const output = await run('prisma', ['migrate', 'status']);
|
const output = await run('prisma', ['migrate', 'status']);
|
||||||
|
|
||||||
|
console.log(output);
|
||||||
|
|
||||||
const missingMigrations = output.includes('have not yet been applied');
|
const missingMigrations = output.includes('have not yet been applied');
|
||||||
const missingInitialMigration = output.includes('01_init');
|
const missingInitialMigration =
|
||||||
|
output.includes('01_init') && !output.includes('The last common migration is: 01_init');
|
||||||
const notManaged = output.includes('The current database is not managed');
|
const notManaged = output.includes('The current database is not managed');
|
||||||
|
|
||||||
if (notManaged || missingMigrations) {
|
if (notManaged || missingMigrations) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue