<?php
declare(strict_types=1);

return [
    'up' => "
ALTER TABLE death_cases
    ADD COLUMN inheritance_notice_path  VARCHAR(500)          NULL AFTER death_certificate_path,
    ADD COLUMN board_fee_method         ENUM('percentage','fixed') NULL AFTER fee_amount,
    ADD COLUMN board_fee_value          DECIMAL(10,4)         NULL AFTER board_fee_method,
    ADD COLUMN board_fee_amount         DECIMAL(15,2)         NULL AFTER board_fee_value,
    ADD COLUMN board_decision_reference VARCHAR(100)          NULL AFTER board_fee_amount,
    ADD COLUMN board_decision_date      DATE                  NULL AFTER board_decision_reference,
    ADD COLUMN board_notes              TEXT                  NULL AFTER board_decision_date,
    ADD COLUMN board_approved_by        BIGINT UNSIGNED       NULL AFTER board_notes,
    ADD COLUMN board_approved_at        TIMESTAMP             NULL AFTER board_approved_by,
    ADD COLUMN payment_request_id       BIGINT UNSIGNED       NULL AFTER board_approved_at;

ALTER TABLE members
    ADD COLUMN transferred_from_death_id BIGINT UNSIGNED NULL AFTER transferred_from_divorce_id;
",
    'down' => "
ALTER TABLE death_cases
    DROP COLUMN inheritance_notice_path,
    DROP COLUMN board_fee_method,
    DROP COLUMN board_fee_value,
    DROP COLUMN board_fee_amount,
    DROP COLUMN board_decision_reference,
    DROP COLUMN board_decision_date,
    DROP COLUMN board_notes,
    DROP COLUMN board_approved_by,
    DROP COLUMN board_approved_at,
    DROP COLUMN payment_request_id;

ALTER TABLE members
    DROP COLUMN transferred_from_death_id;
",
];
