diff options
author | Marc A. Pelletier <marc@uberbox.org> | 2012-03-27 22:44:32 -0400 |
---|---|---|
committer | Antoine Musso <hashar@free.fr> | 2012-05-03 12:07:30 +0200 |
commit | 7694faf68f975ea9c4888d575b33dabb84e90083 (patch) | |
tree | 5ceab5c5e1c68b9d6fbc0be14827b9f4bad7f0d1 /maintenance/oracle | |
parent | 5343b3eb3e4e11634be5e161120d879cd80bf70c (diff) | |
download | mediawikicore-7694faf68f975ea9c4888d575b33dabb84e90083.tar.gz mediawikicore-7694faf68f975ea9c4888d575b33dabb84e90083.zip |
(bug 5445) remove autoblocks when user is unblocked
Previously, whenever we blocked a user, its IP address would be
autoblocked whenever he tries to edit a page. Thus when later unblocking
the username, he would be automatically blocked again if we forgot to
clean up is IP.
This patch introduces a the ipb_parent_block_id column in ipblocks table
to track which block triggered the autoblock command. Thus, when deleting
the original block we can easily remove all subsequentautoblocks.
Schema updaters for MySQL, SQLite and postgres have been added to the
patch but not for the other database types such as ibm_db2, mssql and
Oracle.
Change-Id: I4aa820ae9bbd962a12d0b48b6c638a1b6ff4efc9
Diffstat (limited to 'maintenance/oracle')
-rw-r--r-- | maintenance/oracle/tables.sql | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/maintenance/oracle/tables.sql b/maintenance/oracle/tables.sql index 9f875aed5095..3722120519db 100644 --- a/maintenance/oracle/tables.sql +++ b/maintenance/oracle/tables.sql @@ -272,7 +272,8 @@ CREATE TABLE &mw_prefix.ipblocks ( ipb_range_end VARCHAR2(255), ipb_deleted CHAR(1) DEFAULT '0' NOT NULL, ipb_block_email CHAR(1) DEFAULT '0' NOT NULL, - ipb_allow_usertalk CHAR(1) DEFAULT '0' NOT NULL + ipb_allow_usertalk CHAR(1) DEFAULT '0' NOT NULL, + ipb_parent_block_id NUMBER DEFAULT NULL ); ALTER TABLE &mw_prefix.ipblocks ADD CONSTRAINT &mw_prefix.ipblocks_pk PRIMARY KEY (ipb_id); ALTER TABLE &mw_prefix.ipblocks ADD CONSTRAINT &mw_prefix.ipblocks_fk1 FOREIGN KEY (ipb_user) REFERENCES &mw_prefix.mwuser(user_id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED; |