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>
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.tocco.nice2.dbrefactoring.spi.liquibase.JdbcHelper
JdbcHelper.SqlFunction<A,
B> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(liquibase.database.Database database) void
setFileOpener
(liquibase.resource.ResourceAccessor resourceAccessor) void
setFragments
(String fragments) void
setUp()
liquibase.exception.ValidationErrors
validate
(liquibase.database.Database database) Methods inherited from class ch.tocco.nice2.dbrefactoring.spi.liquibase.JdbcHelper
ddlStatement, tableExists, uniqueIndexExists, withConnection, withResultSet, withStatement
-
Constructor Details
-
RunFragmentChange
public RunFragmentChange() -
RunFragmentChange
-
-
Method Details
-
validate
public liquibase.exception.ValidationErrors validate(liquibase.database.Database database) - Specified by:
validate
in interfaceliquibase.change.custom.CustomChange
-
execute
public void execute(liquibase.database.Database database) throws liquibase.exception.CustomChangeException - Specified by:
execute
in interfaceliquibase.change.custom.CustomTaskChange
- Throws:
liquibase.exception.CustomChangeException
-
getConfirmationMessage
- Specified by:
getConfirmationMessage
in interfaceliquibase.change.custom.CustomChange
-
setUp
public void setUp() throws liquibase.exception.SetupException- Specified by:
setUp
in interfaceliquibase.change.custom.CustomChange
- Throws:
liquibase.exception.SetupException
-
setFileOpener
public void setFileOpener(liquibase.resource.ResourceAccessor resourceAccessor) - Specified by:
setFileOpener
in interfaceliquibase.change.custom.CustomChange
-
getFragments
-
setFragments
-