Class ConfluenceSchemaHelper
- java.lang.Object
-
- com.atlassian.confluence.impl.core.persistence.hibernate.schema.ConfluenceSchemaHelper
-
@NotThreadSafe @Internal public class ConfluenceSchemaHelper extends Object
Replaces functionality in the ConfluenceHibernateSetup for running schema actions against a database.This implementation is a Spring-ified object that can be created and managed by an IoC container.
- Since:
- 6.10.0
-
-
Field Summary
Fields Modifier and Type Field Description static String
COMPONENT_REFERENCE
-
Constructor Summary
Constructors Constructor Description ConfluenceSchemaHelper(Iterable<String> mappingResources, com.atlassian.config.db.HibernateConfig hibernateConfig, HibernateMetadataSource hibernateMetadataSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.hibernate.cfg.Configuration
getConfiguration()
void
reset()
void
updateSchemaIfNeeded()
If there are any updates to the Schema needed, do them.void
updateSchemaIfNeeded(boolean showDDL)
void
updateVersionHistorySchemaIfNeeded()
void
validateSchemaUpdateIfNeeded()
-
-
-
Field Detail
-
COMPONENT_REFERENCE
public static final String COMPONENT_REFERENCE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConfluenceSchemaHelper
public ConfluenceSchemaHelper(Iterable<String> mappingResources, com.atlassian.config.db.HibernateConfig hibernateConfig, HibernateMetadataSource hibernateMetadataSource)
- Since:
- 7.1
-
-
Method Detail
-
getConfiguration
public org.hibernate.cfg.Configuration getConfiguration()
- Returns:
- realises the config.
-
updateSchemaIfNeeded
public void updateSchemaIfNeeded() throws com.atlassian.config.ConfigurationException
If there are any updates to the Schema needed, do them.- Throws:
com.atlassian.config.ConfigurationException
-
validateSchemaUpdateIfNeeded
public void validateSchemaUpdateIfNeeded() throws com.atlassian.config.ConfigurationException
- Throws:
com.atlassian.config.ConfigurationException
-
updateSchemaIfNeeded
public void updateSchemaIfNeeded(boolean showDDL) throws com.atlassian.config.ConfigurationException
- Parameters:
showDDL
- - false will output DDL to stdout- Throws:
com.atlassian.config.ConfigurationException
-
updateVersionHistorySchemaIfNeeded
public void updateVersionHistorySchemaIfNeeded()
-
reset
public void reset()
-
-