Index: trunk/phase3/maintenance/oracle/tables.sql |
— | — | @@ -259,7 +259,7 @@ |
260 | 260 | ipb_address VARCHAR2(255) NULL, |
261 | 261 | ipb_user NUMBER DEFAULT 0 NOT NULL, |
262 | 262 | ipb_by NUMBER DEFAULT 0 NOT NULL, |
263 | | - ipb_by_text VARCHAR2(255) NOT NULL, |
| 263 | + ipb_by_text VARCHAR2(255) NULL, |
264 | 264 | ipb_reason VARCHAR2(255) NOT NULL, |
265 | 265 | ipb_timestamp TIMESTAMP(6) WITH TIME ZONE NOT NULL, |
266 | 266 | ipb_auto CHAR(1) DEFAULT '0' NOT NULL, |
Index: trunk/phase3/maintenance/oracle/archives/patch_remove_not_null_empty_defs2.sql |
— | — | @@ -0,0 +1,3 @@ |
| 2 | +define mw_prefix='{$wgDBprefix}'; |
| 3 | + |
| 4 | +ALTER TABLE &mw_prefix.ipblocks MODIFY ipb_by_text DEFAULT NULL NULL; |
Property changes on: trunk/phase3/maintenance/oracle/archives/patch_remove_not_null_empty_defs2.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 5 | + native |
Index: trunk/phase3/includes/installer/OracleUpdater.php |
— | — | @@ -46,6 +46,7 @@ |
47 | 47 | array( 'addTable', 'globalinterwiki', 'patch-globalinterwiki.sql' ), |
48 | 48 | array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1_field.sql' ), |
49 | 49 | array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1_field.sql' ), |
| 50 | + array( 'doRemoveNotNullEmptyDefaults2' ), |
50 | 51 | |
51 | 52 | // till 2.0 i guess |
52 | 53 | array( 'doRebuildDuplicateFunction' ), |
— | — | @@ -145,6 +146,16 @@ |
146 | 147 | $this->applyPatch( 'patch_remove_not_null_empty_defs.sql', false ); |
147 | 148 | $this->output( "ok\n" ); |
148 | 149 | } |
| 150 | + protected function doRemoveNotNullEmptyDefaults2() { |
| 151 | + $this->output( "Removing not null empty constraints ... " ); |
| 152 | + $meta = $this->db->fieldInfo( 'ipblocks' , 'ipb_by_text' ); |
| 153 | + if ( $meta->isNullable() ) { |
| 154 | + $this->output( "constraints seem to be removed\n" ); |
| 155 | + return; |
| 156 | + } |
| 157 | + $this->applyPatch( 'patch_remove_not_null_empty_defs2.sql', false ); |
| 158 | + $this->output( "ok\n" ); |
| 159 | + } |
149 | 160 | |
150 | 161 | /** |
151 | 162 | * rebuilding of the function that duplicates tables for tests |
Index: trunk/phase3/includes/Block.php |
— | — | @@ -426,9 +426,12 @@ |
427 | 427 | # Don't collide with expired blocks |
428 | 428 | Block::purgeExpired(); |
429 | 429 | |
| 430 | + $row = $this->getDatabaseArray(); |
| 431 | + $row['ipb_id'] = $dbw->nextSequenceValue("ipblocks_ipb_id_seq"); |
| 432 | + |
430 | 433 | $dbw->insert( |
431 | 434 | 'ipblocks', |
432 | | - $this->getDatabaseArray(), |
| 435 | + $row, |
433 | 436 | __METHOD__, |
434 | 437 | array( 'IGNORE' ) |
435 | 438 | ); |