v.0.50 db migration bug
This commit is contained in:
parent
488f329e14
commit
cd61c2ef7f
|
|
@ -701,6 +701,21 @@ function reconcileLegacyMigrations() {
|
||||||
}
|
}
|
||||||
console.log('[migration] users: snowball_extra_payment column added');
|
console.log('[migration] users: snowball_extra_payment column added');
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
version: 'v0.50',
|
||||||
|
description: 'payments: balance_delta column for debt payoff tracking',
|
||||||
|
check: function() {
|
||||||
|
const cols = db.prepare('PRAGMA table_info(payments)').all().map(c => c.name);
|
||||||
|
return cols.includes('balance_delta');
|
||||||
|
},
|
||||||
|
run: function() {
|
||||||
|
const cols = db.prepare('PRAGMA table_info(payments)').all().map(c => c.name);
|
||||||
|
if (!cols.includes('balance_delta')) {
|
||||||
|
db.exec('ALTER TABLE payments ADD COLUMN balance_delta REAL');
|
||||||
|
}
|
||||||
|
console.log('[migration] payments: balance_delta column added');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue