<?php
declare(strict_types=1);

return [
    'up' => "ALTER TABLE `sa_subscriptions`
    ADD COLUMN `payment_id` BIGINT UNSIGNED NULL AFTER `paid_amount`,
    ADD COLUMN `receipt_id` BIGINT UNSIGNED NULL AFTER `payment_id`,
    ADD COLUMN `receipt_number` VARCHAR(50) NULL AFTER `receipt_id`,
    ADD INDEX `idx_sa_sub_payment` (`payment_id`);
ALTER TABLE `sa_bookings`
    ADD COLUMN `payment_id` BIGINT UNSIGNED NULL AFTER `payment_status`,
    ADD COLUMN `receipt_id` BIGINT UNSIGNED NULL AFTER `payment_id`,
    ADD COLUMN `receipt_number` VARCHAR(50) NULL AFTER `receipt_id`,
    ADD INDEX `idx_sa_bk_payment` (`payment_id`);",
    'down' => "ALTER TABLE `sa_subscriptions`
    DROP INDEX `idx_sa_sub_payment`,
    DROP COLUMN `receipt_number`,
    DROP COLUMN `receipt_id`,
    DROP COLUMN `payment_id`;
ALTER TABLE `sa_bookings`
    DROP INDEX `idx_sa_bk_payment`,
    DROP COLUMN `receipt_number`,
    DROP COLUMN `receipt_id`,
    DROP COLUMN `payment_id`;",
];
