Class RunFragmentChange

java.lang.Object
ch.tocco.nice2.dbrefactoring.spi.liquibase.JdbcHelper
ch.tocco.nice2.dbrefactoring.impl.liquibase.RunFragmentChange
All Implemented Interfaces:
liquibase.change.custom.CustomChange, liquibase.change.custom.CustomTaskChange

public class RunFragmentChange extends JdbcHelper implements liquibase.change.custom.CustomTaskChange
Executes the given fragments Parameters: * fragments The fragments to run (comma separated list) Example:

 <changeSet author="anonymous" context="schemaDefinition" dbms="postgresql" id="custom_change/2.X.XXX.0">
   <preConditions onFail="MARK_RAN">
     <sqlCheck expectedResult="0">select count(*) from nice_folder where entity_model = 'Report'</sqlCheck>
   </preConditions>
   <customChange class="ch.tocco.nice2.dbrefactoring.impl.liquibase.RunFragmentChange">
     <param name="fragments" value="CreateEntityFoldersFragment,AddForeignKeysIndex"/>
   </customChange>
 </changeSet>
 
  • Constructor Details

    • RunFragmentChange

      public RunFragmentChange()
    • RunFragmentChange

      public RunFragmentChange(InstallationStep installationStep)
  • Method Details

    • validate

      public liquibase.exception.ValidationErrors validate(liquibase.database.Database database)
      Specified by:
      validate in interface liquibase.change.custom.CustomChange
    • execute

      public void execute(liquibase.database.Database database) throws liquibase.exception.CustomChangeException
      Specified by:
      execute in interface liquibase.change.custom.CustomTaskChange
      Throws:
      liquibase.exception.CustomChangeException
    • getConfirmationMessage

      public String getConfirmationMessage()
      Specified by:
      getConfirmationMessage in interface liquibase.change.custom.CustomChange
    • setUp

      public void setUp() throws liquibase.exception.SetupException
      Specified by:
      setUp in interface liquibase.change.custom.CustomChange
      Throws:
      liquibase.exception.SetupException
    • setFileOpener

      public void setFileOpener(liquibase.resource.ResourceAccessor resourceAccessor)
      Specified by:
      setFileOpener in interface liquibase.change.custom.CustomChange
    • getFragments

      public String getFragments()
    • setFragments

      public void setFragments(String fragments)