ALTER TABLE jis_infotexts
    ADD COLUMN repeat_enabled boolean DEFAULT false,
    ADD COLUMN repeat_time_start time NULL DEFAULT NULL,
    ADD COLUMN repeat_time_end time NULL DEFAULT NULL,
    ADD CONSTRAINT jis_infotexts_repeat_times_required CHECK (
        CASE
            WHEN repeat_enabled = true THEN repeat_time_start IS NOT NULL AND repeat_time_end IS NOT NULL
            ELSE true
        END
    );
