Files
omsorg/mitarbeiter-app/migrations/004_login_attempts.php
T
2026-06-13 20:03:22 +02:00

14 lines
515 B
PHP

<?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)",
],
];