<?php
declare(strict_types=1);

return [
    'up' => "
        ALTER TABLE `receipts`
            DROP FOREIGN KEY `fk_receipts_member`;
        ALTER TABLE `receipts`
            MODIFY COLUMN `member_id` BIGINT UNSIGNED NULL;
        ALTER TABLE `receipts`
            ADD CONSTRAINT `fk_receipts_member` FOREIGN KEY (`member_id`) REFERENCES `members`(`id`) ON DELETE SET NULL
    ",
    'down' => "
        ALTER TABLE `receipts`
            DROP FOREIGN KEY `fk_receipts_member`;
        ALTER TABLE `receipts`
            MODIFY COLUMN `member_id` BIGINT UNSIGNED NOT NULL;
        ALTER TABLE `receipts`
            ADD CONSTRAINT `fk_receipts_member` FOREIGN KEY (`member_id`) REFERENCES `members`(`id`)
    ",
];
