Add FalukantFamilyWorker and related SQL queries: Introduced the FalukantFamilyWorker to manage family-related logic, including marriage satisfaction and relationship states. Added new SQL queries for handling lover relationships and marriage updates, enhancing the overall functionality of family dynamics in the application.

This commit is contained in:
Torsten Schulz (local)
2026-03-20 10:26:15 +01:00
parent f9c80bbd6b
commit 6a5ff4557e
8 changed files with 1164 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
-- Upgrade falls bereits 001 mit alten Spaltennamen eingespielt wurde.
-- Neuinstallationen nutzen 001 direkt und brauchen 002 nicht.
DO $$
BEGIN
IF EXISTS (
SELECT 1 FROM information_schema.columns
WHERE table_schema = 'falukant_data' AND table_name = 'relationship_state'
AND column_name = 'consecutive_underpayment_months'
) THEN
ALTER TABLE falukant_data.relationship_state
RENAME COLUMN consecutive_underpayment_months TO months_underfunded;
END IF;
END $$;
ALTER TABLE falukant_data.relationship_state
ADD COLUMN IF NOT EXISTS last_daily_processed_at timestamptz,
ADD COLUMN IF NOT EXISTS last_monthly_processed_at timestamptz;