diff options
Diffstat (limited to 'includes/installer/OracleUpdater.php')
-rw-r--r-- | includes/installer/OracleUpdater.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/includes/installer/OracleUpdater.php b/includes/installer/OracleUpdater.php index 4d85924e..7664a418 100644 --- a/includes/installer/OracleUpdater.php +++ b/includes/installer/OracleUpdater.php @@ -21,6 +21,7 @@ class OracleUpdater extends DatabaseUpdater { array( 'doFunctions17' ), array( 'doSchemaUpgrade17' ), array( 'doInsertPage0' ), + array( 'doRemoveNotNullEmptyDefaults' ), ); } @@ -103,6 +104,21 @@ class OracleUpdater extends DatabaseUpdater { } /** + * Remove DEFAULT '' NOT NULL constraints from fields as '' is internally + * converted to NULL in Oracle + */ + protected function doRemoveNotNullEmptyDefaults() { + $this->output( "Removing not null empty constraints ... " ); + $meta = $this->db->fieldInfo( 'categorylinks' , 'cl_sortkey_prefix' ); + if ( $meta->isNullable() ) { + $this->output( "constraints seem to be removed\n" ); + return; + } + $this->applyPatch( 'patch_remove_not_null_empty_defs.sql', false ); + $this->output( "ok\n" ); + } + + /** * Overload: after this action field info table has to be rebuilt */ public function doUpdates( $what = array( 'core', 'extensions', 'purge' ) ) { |