-- Ehe-Buffs (Spec: Geschenke, Fest, Hausversorgung ohne Liebschaft) + Backend-Steuerung
ALTER TABLE falukant_data.relationship
    ADD COLUMN IF NOT EXISTS marriage_gift_buff_days_remaining smallint NOT NULL DEFAULT 0
        CHECK (marriage_gift_buff_days_remaining >= 0 AND marriage_gift_buff_days_remaining <= 30),
    ADD COLUMN IF NOT EXISTS marriage_pending_feast_bonus smallint NOT NULL DEFAULT 0
        CHECK (marriage_pending_feast_bonus >= 0 AND marriage_pending_feast_bonus <= 20),
    ADD COLUMN IF NOT EXISTS marriage_house_supply smallint NOT NULL DEFAULT 50
        CHECK (marriage_house_supply >= 0 AND marriage_house_supply <= 100),
    ADD COLUMN IF NOT EXISTS marriage_no_lover_bonus_counter smallint NOT NULL DEFAULT 0
        CHECK (marriage_no_lover_bonus_counter >= 0 AND marriage_no_lover_bonus_counter < 4);

COMMENT ON COLUMN falukant_data.relationship.marriage_gift_buff_days_remaining IS
    'Backend setzt z.B. 5 nach Geschenk: Daemon +1 Ehezufriedenheit/Tag, Zähler runter';
COMMENT ON COLUMN falukant_data.relationship.marriage_pending_feast_bonus IS
    'Einmal +2..+5 beim nächsten Daily-Tick (Backend), danach 0';
COMMENT ON COLUMN falukant_data.relationship.marriage_house_supply IS
    'Hausversorgung 0..100; ab ~65: +1 Ehezufriedenheit alle 4 Tage ohne aktive Liebschaft';
