Refactor financial transaction handling: Consolidate Einnahmen and Ausgaben into Buchung model, update routes and UI components, and add new migration scripts for database schema changes.

This commit is contained in:
hwinkel
2026-03-24 21:06:07 +01:00
parent d582c748a2
commit 1ec15600b5
18 changed files with 928 additions and 358 deletions
@@ -0,0 +1,9 @@
-- Add buchungId field to invoices table
ALTER TABLE `invoices` ADD COLUMN `buchungId` VARCHAR(191) NULL;
-- Create unique index for the foreign key
ALTER TABLE `invoices` ADD UNIQUE INDEX `invoices_buchungId_key`(`buchungId`);
-- Add foreign key constraint
ALTER TABLE `invoices` ADD CONSTRAINT `invoices_buchungId_fkey`
FOREIGN KEY (`buchungId`) REFERENCES `buchungen`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;