<?php
declare(strict_types=1);
return [
    'up' => "ALTER TABLE `payments`
    MODIFY COLUMN `member_id` BIGINT UNSIGNED NULL,
    ADD COLUMN `player_id` BIGINT UNSIGNED NULL AFTER `member_id`,
    ADD INDEX `idx_payments_player` (`player_id`),
    ADD CONSTRAINT `fk_payments_player` FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE SET NULL",
    'down' => "ALTER TABLE `payments`
    DROP FOREIGN KEY `fk_payments_player`,
    DROP INDEX `idx_payments_player`,
    DROP COLUMN `player_id`,
    MODIFY COLUMN `member_id` BIGINT UNSIGNED NOT NULL",
];
