Class DbScriptUpgradeOperation

  • All Implemented Interfaces:
    org.craftercms.commons.upgrade.UpgradeOperation<String>, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware
    Direct Known Subclasses:
    MigrateWorkflowUpgradeOperation, PopulateItemTableUpgradeOperation

    public class DbScriptUpgradeOperation
    extends AbstractUpgradeOperation
    Implementation of UpgradeOperation that executes a database script.

    Supported YAML properties:

    • filename: (required) the name of the db script file
    • updateIntegrity: (optional) indicates if the db integrity should be updated, defaults to true
    Author:
    joseross
    • Field Detail

      • scriptFolder

        protected String scriptFolder
        Path of the folder to search the script file.
      • fileName

        protected String fileName
        Filename of the script.
      • updateIntegrity

        protected boolean updateIntegrity
        Indicates if the integrity value should be updated after executing the script.
      • integrityValidator

        protected org.craftercms.commons.entitlements.validator.DbIntegrityValidator integrityValidator
        The database integrity validator.
    • Constructor Detail

      • DbScriptUpgradeOperation

        @ConstructorProperties({"studioConfiguration","scriptFolder","integrityValidator"})
        public DbScriptUpgradeOperation​(StudioConfiguration studioConfiguration,
                                        String scriptFolder,
                                        org.craftercms.commons.entitlements.validator.DbIntegrityValidator integrityValidator)
    • Method Detail

      • doInit

        public void doInit​(org.apache.commons.configuration2.HierarchicalConfiguration config)
        Overrides:
        doInit in class org.craftercms.commons.upgrade.impl.operations.AbstractUpgradeOperation<String>