<?php
declare(strict_types=1);

return [
    'up' => "
        CREATE TABLE IF NOT EXISTS `member_notes` (
            `id`          BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
            `member_id`   BIGINT UNSIGNED NOT NULL,
            `note_text`   TEXT NOT NULL,
            `created_at`  TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
            `created_by`  BIGINT UNSIGNED NULL,
            INDEX `idx_member_notes_member` (`member_id`),
            CONSTRAINT `fk_member_notes_member` FOREIGN KEY (`member_id`) REFERENCES `members`(`id`) ON DELETE CASCADE
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    ",
    'down' => "DROP TABLE IF EXISTS `member_notes`",
];