Fix receipts bugs: budget queries, undo/transfer desync, timer spam
This commit is contained in:
10
migrations/02_receipts_fixes.js
Normal file
10
migrations/02_receipts_fixes.js
Normal file
@@ -0,0 +1,10 @@
|
||||
module.exports = {
|
||||
up: async ({ context: db }) => {
|
||||
db.exec(`ALTER TABLE grocery_spendings ADD COLUMN is_transfer INTEGER NOT NULL DEFAULT 0;`);
|
||||
db.exec(`CREATE UNIQUE INDEX IF NOT EXISTS idx_weekly_budgets_unique_start ON weekly_budgets (start_date);`);
|
||||
},
|
||||
down: async ({ context: db }) => {
|
||||
db.exec(`DROP INDEX IF EXISTS idx_weekly_budgets_unique_start;`);
|
||||
db.exec(`ALTER TABLE grocery_spendings DROP COLUMN is_transfer;`);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user