<?php
return [
    'description' => 'Login attempts table for IP-based rate limiting',
    'up' => [
        "CREATE TABLE IF NOT EXISTS login_attempts (
            id           INT          NOT NULL AUTO_INCREMENT PRIMARY KEY,
            ip           VARCHAR(45)  NOT NULL DEFAULT '',
            username     VARCHAR(190) NOT NULL DEFAULT '',
            attempted_at VARCHAR(32)  NOT NULL DEFAULT ''
        )",
        "CREATE INDEX idx_login_attempts_ip_time ON login_attempts (ip, attempted_at)",
    ],
];
