1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

[ticket/10247] Remove unecessary attempt_id primary key column

The database update drops any key of the same name (potential primary key) and
afterwards the column. This does not work on some of the supported DBMS and
needs further changes.

PHPBB3-10247
This commit is contained in:
Nils Adermann
2011-07-03 02:15:40 -04:00
parent ffa6f3448f
commit cf4b639be5
9 changed files with 13 additions and 54 deletions

View File

@@ -527,18 +527,14 @@ CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id);
/*
Table: 'phpbb_login_attempts'
*/
CREATE SEQUENCE phpbb_login_attempts_seq;
CREATE TABLE phpbb_login_attempts (
attempt_id INT4 DEFAULT nextval('phpbb_login_attempts_seq'),
attempt_ip varchar(40) DEFAULT '' NOT NULL,
attempt_browser varchar(150) DEFAULT '' NOT NULL,
attempt_forwarded_for varchar(255) DEFAULT '' NOT NULL,
attempt_time INT4 DEFAULT '0' NOT NULL CHECK (attempt_time >= 0),
user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
username varchar(255) DEFAULT '0' NOT NULL,
username_clean varchar_ci DEFAULT '0' NOT NULL,
PRIMARY KEY (attempt_id)
username_clean varchar_ci DEFAULT '0' NOT NULL
);
CREATE INDEX phpbb_login_attempts_att_ip ON phpbb_login_attempts (attempt_ip, attempt_time);