|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.upgrade.AbstractUpgradeTask com.atlassian.confluence.upgrade.upgradetask.AddUniqueAttachmentIdConstraintToAttachmentDataUpgradeTask
public class AddUniqueAttachmentIdConstraintToAttachmentDataUpgradeTask
This task adds a unique constraint to the AttachmentId column on the AttachmentData table. Having multiple records for the one attachment id is an invalid state that causes errors (CONF-7882). In order to create the constraint this task does the following:
This task does not need to run in an import or on setup of a new system because the constraints are included
in the hibernate schema. It MUST run pre-upgrade because it relies on the
SchemaHelper.updateSchemaIfNeeded()
to re-create the indices in
Sql Server. See dropIndicesFromSqlServer(ConfluenceHibernateConfig)
.
Constructor Summary | |
---|---|
AddUniqueAttachmentIdConstraintToAttachmentDataUpgradeTask(net.sf.hibernate.SessionFactory sessionFactory,
AlterTableExecutor alterTableExecutor,
DdlExecutor ddlExecutor,
org.springframework.transaction.PlatformTransactionManager transactionManager)
|
Method Summary | |
---|---|
boolean |
breaksBackwardCompatibility()
Returns true if a new export can't be imported in an older instance. |
void |
doUpgrade()
Perform the upgrade. |
java.lang.String |
getBuildNumber()
|
java.lang.String |
getShortDescription()
A short (<50 chars) description of the upgrade action |
boolean |
runOnSpaceImport()
Returns true if an older Space can't be imported in a new instance without running this task. |
Methods inherited from class com.atlassian.confluence.upgrade.AbstractUpgradeTask |
---|
addAllErrors, addError, addError, getConstraint, getErrors, setBuildNumber, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.confluence.upgrade.UpgradeTask |
---|
getConstraint, getErrors, validate |
Constructor Detail |
---|
public AddUniqueAttachmentIdConstraintToAttachmentDataUpgradeTask(net.sf.hibernate.SessionFactory sessionFactory, AlterTableExecutor alterTableExecutor, DdlExecutor ddlExecutor, org.springframework.transaction.PlatformTransactionManager transactionManager)
Method Detail |
---|
public java.lang.String getBuildNumber()
getBuildNumber
in interface UpgradeTask
getBuildNumber
in class AbstractUpgradeTask
public java.lang.String getShortDescription()
UpgradeTask
getShortDescription
in interface UpgradeTask
getShortDescription
in class AbstractUpgradeTask
public void doUpgrade() throws java.lang.Exception
UpgradeTask
doUpgrade
in interface UpgradeTask
java.lang.Exception
public boolean runOnSpaceImport()
BackupSupport
runOnSpaceImport
in interface BackupSupport
public boolean breaksBackwardCompatibility()
BackupSupport
breaksBackwardCompatibility
in interface BackupSupport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |