CREATE TABLE blc_user_login_attempt (id VARCHAR(36) NOT NULL, attempt_timestamp TIMESTAMP WITHOUT TIME ZONE NOT NULL, auth_server_id VARCHAR(255) NOT NULL, considered CHAR(1) DEFAULT 'Y' NOT NULL, login_attempt_result VARCHAR(255), user_id VARCHAR(255), username VARCHAR(255) NOT NULL, CONSTRAINT blc_user_login_attempt_pkey PRIMARY KEY (id));
CREATE INDEX idx57hip06m20v679o7m7gh95iqs ON blc_user_login_attempt(username, auth_server_id);
ALTER TABLE blc_authorization_server ADD login_attempts_allowed INTEGER;
ALTER TABLE blc_authorization_server ADD lockout_duration_mins BIGINT;
ALTER TABLE blc_authorization_server ADD login_fail_decay_mins BIGINT;
ALTER TABLE blc_user ADD user_locked_time TIMESTAMP WITHOUT TIME ZONE;
ALTER TABLE blc_authorization_server ADD embedded_login_enabled CHAR(1) DEFAULT 'N' NOT NULL;
ALTER TABLE blc_authorization_server ADD locked_usr_can_reset_pwd CHAR(1);
ALTER TABLE blc_authorization_server ADD reset_pwd_unlocks_usr CHAR(1);
ALTER TABLE blc_password_token ADD purpose VARCHAR(255) DEFAULT 'RESET_PASSWORD' NOT NULL;
