CREATE TABLE `{LOGINPROTECTION_ATTEMPTS}` (
	`id` INT NOT NULL AUTO_INCREMENT,
	`identity_type` VARCHAR(16) NOT NULL,
	`identity_value` VARCHAR(191) NOT NULL,
	`identity_hash` CHAR(64) NOT NULL,
	`failed_attempts` INT NOT NULL DEFAULT 0,
	`locked_until` INT NOT NULL DEFAULT 0,
	`first_attempt_at` INT NOT NULL DEFAULT 0,
	`last_attempt_at` INT NOT NULL DEFAULT 0,
	`created_at` INT NOT NULL DEFAULT 0,
	`updated_at` INT NOT NULL DEFAULT 0,
	PRIMARY KEY (`id`),
	UNIQUE KEY `uq_loginprotection_attempts_identity` (`identity_type`, `identity_hash`),
	KEY `ix_loginprotection_attempts_locked_until` (`locked_until`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
