<?php
declare(strict_types=1);

return [
    'up' => "
ALTER TABLE players
    ADD COLUMN password_hash VARCHAR(255) NULL AFTER phone,
    ADD COLUMN otp_code VARCHAR(6) NULL AFTER password_hash,
    ADD COLUMN otp_expires_at DATETIME NULL AFTER otp_code,
    ADD COLUMN last_login_at DATETIME NULL AFTER otp_expires_at;
ALTER TABLE players ADD INDEX idx_players_phone (phone)",
    'down' => "
ALTER TABLE players
    DROP INDEX idx_players_phone,
    DROP COLUMN last_login_at,
    DROP COLUMN otp_expires_at,
    DROP COLUMN otp_code,
    DROP COLUMN password_hash",
];
