Class 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
    • 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()