v.0.50 db migration bug

This commit is contained in:
null 2026-05-14 02:51:29 -05:00
parent 488f329e14
commit cd61c2ef7f
1 changed files with 15 additions and 0 deletions

View File

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