public class CheckAndFixSQLServerCatalogNameInJDBCConnectionUrlUpgradeTask extends AbstractUpgradeTask
java.sql.SQLException: The database name component of the object qualifier must be the name of the current database.
Constructor and Description |
---|
CheckAndFixSQLServerCatalogNameInJDBCConnectionUrlUpgradeTask(BootstrapManager bootstrapManager,
String configFilename,
com.atlassian.config.db.DatabaseHelper databaseHelper,
com.atlassian.config.ApplicationConfig applicationConfig,
TomcatConfigHelper tomcatConfigHelper) |
Modifier and Type | Method and Description |
---|---|
boolean |
breaksBackwardCompatibility()
Returns true if a new export can't be imported in an older instance.
|
void |
doUpgrade()
This method actually doesn't do anything, the actual work is done inside the
validate() method. |
String |
getBuildNumber() |
boolean |
runOnSpaceImport()
Returns true if an older Space can't be imported in a new instance without running this task.
|
void |
validate()
We perform the actual task of changing the jdbc connection url here, even though this is meant to only validate, because
the schema check and validation will fail when the catalog name is wrongly cased.
|
addAllErrors, addError, addError, getConstraint, getErrors, getName, getShortDescription, isDatabaseUpgrade, setBeanName, setBuildNumber
public CheckAndFixSQLServerCatalogNameInJDBCConnectionUrlUpgradeTask(BootstrapManager bootstrapManager, String configFilename, com.atlassian.config.db.DatabaseHelper databaseHelper, com.atlassian.config.ApplicationConfig applicationConfig, TomcatConfigHelper tomcatConfigHelper)
public String getBuildNumber()
getBuildNumber
in interface UpgradeTaskInfo
getBuildNumber
in class AbstractUpgradeTask
public boolean runOnSpaceImport()
BackupSupport
Note that tasks don't run on space import yet, so we just reject the import in this case.
public boolean breaksBackwardCompatibility()
BackupSupport
Breaking compatibility means a snapshot of the new version will not work at all with the previous version. For example:
public void doUpgrade()
validate()
method.public void validate() throws Exception
doUpgrade()
method is run
too late in the schema upgrade process (as the failure occurs as soon as ConfluenceSchemaHelper.validateSchemaUpdateIfNeeded()
is run).validate
in interface UpgradeTask
validate
in class AbstractUpgradeTask
Exception
- if validation failsCopyright © 2003–2021 Atlassian. All rights reserved.