* Oracle inserts NULL, so namespace fields should have a default value
*/
protected function doNamespaceDefaults() {
+ $this->output( "Altering namespace fields with default value ... " );
$meta = $this->db->fieldInfo( 'page', 'page_namespace' );
if ( $meta->defaultValue() != null ) {
+ $this->output( "defaults seem to present on namespace fields\n" );
return;
}
- $this->applyPatch( 'patch_namespace_defaults.sql', false, "Altering namespace fields with default value" );
+ $this->applyPatch( 'patch_namespace_defaults.sql', false );
+ $this->output( "ok\n" );
}
/**
* Uniform FK names + deferrable state
*/
protected function doFKRenameDeferr() {
+ $this->output( "Altering foreign keys ... " );
$meta = $this->db->query( 'SELECT COUNT(*) cnt FROM user_constraints WHERE constraint_type = \'R\' AND deferrable = \'DEFERRABLE\'' );
$row = $meta->fetchRow();
if ( $row && $row['cnt'] > 0 ) {
+ $this->output( "at least one FK is deferrable, considering up to date\n" );
return;
}
- $this->applyPatch( 'patch_fk_rename_deferred.sql', false, "Altering foreign keys ... " );
+ $this->applyPatch( 'patch_fk_rename_deferred.sql', false );
+ $this->output( "ok\n" );
}
/**
* Recreate functions to 17 schema layout
*/
protected function doFunctions17() {
- $this->applyPatch( 'patch_create_17_functions.sql', false, "Recreating functions" );
+ $this->output( "Recreating functions ... " );
+ $this->applyPatch( 'patch_create_17_functions.sql', false );
+ $this->output( "ok\n" );
}
/**
* there are no incremental patches prior to this
*/
protected function doSchemaUpgrade17() {
+ $this->output( "Updating schema to 17 ... " );
// check if iwlinks table exists which was added in 1.17
if ( $this->db->tableExists( 'iwlinks' ) ) {
+ $this->output( "schema seem to be up to date.\n" );
return;
}
- $this->applyPatch( 'patch_16_17_schema_changes.sql', false, "Updating schema to 17" );
+ $this->applyPatch( 'patch_16_17_schema_changes.sql', false );
+ $this->output( "ok\n" );
}
/**
* 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, "Removing not null empty constraints" );
+ $this->applyPatch( 'patch_remove_not_null_empty_defs.sql', false );
+ $this->output( "ok\n" );
}
-
protected function doRemoveNotNullEmptyDefaults2() {
+ $this->output( "Removing not null empty constraints ... " );
$meta = $this->db->fieldInfo( 'ipblocks' , 'ipb_by_text' );
if ( $meta->isNullable() ) {
+ $this->output( "constraints seem to be removed\n" );
return;
}
- $this->applyPatch( 'patch_remove_not_null_empty_defs2.sql', false, "Removing not null empty constraints" );
+ $this->applyPatch( 'patch_remove_not_null_empty_defs2.sql', false );
+ $this->output( "ok\n" );
}
/**
* cascading taken in account in the deleting function
*/
protected function doRecentchangesFK2Cascade() {
+ $this->output( "Altering RECENTCHANGES_FK2 ... " );
+
$meta = $this->db->query( 'SELECT 1 FROM all_constraints WHERE owner = \''.strtoupper($this->db->getDBname()).'\' AND constraint_name = \''.$this->db->tablePrefix().'RECENTCHANGES_FK2\' AND delete_rule = \'CASCADE\'' );
$row = $meta->fetchRow();
if ( $row ) {
+ $this->output( "FK up to date\n" );
return;
}
- $this->applyPatch( 'patch_recentchanges_fk2_cascade.sql', false, "Altering RECENTCHANGES_FK2" );
+ $this->applyPatch( 'patch_recentchanges_fk2_cascade.sql', false );
+ $this->output( "ok\n" );
}
/**
* rebuilding of the function that duplicates tables for tests
*/
protected function doRebuildDuplicateFunction() {
- $this->applyPatch( 'patch_rebuild_dupfunc.sql', false, "Rebuilding duplicate function" );
+ $this->output( "Rebuilding duplicate function ... " );
+ $this->applyPatch( 'patch_rebuild_dupfunc.sql', false );
+ $this->output( "ok\n" );
}
/**