Top Fields Constructors Methods
liquibase.change.core

public Class DropAllForeignKeyConstraintsChange

extends AbstractChange
Class Inheritance
Annotations
@DatabaseChange
name:dropAllForeignKeyConstraints
description:Drops all foreign key constraints on a table
priority:1
appliesTo:table
Imports
java.util.ArrayList, .Arrays, .HashSet, .List, .Set, liquibase.CatalogAndSchema, liquibase.change.AbstractChange, .ChangeMetaData, .DatabaseChange, .DatabaseChangeProperty, liquibase.database.Database, liquibase.diff.compare.DatabaseObjectComparatorFactory, liquibase.exception.DatabaseException, .UnexpectedLiquibaseException, liquibase.snapshot.InvalidExampleException, .SnapshotControl, .SnapshotGeneratorFactory, liquibase.statement.SqlStatement, liquibase.structure.core.ForeignKey, .Table

Field Summary

Modifier and TypeField and Description
private String
private String
private String
Inherited from liquibase.change.AbstractChange:
NODENAME_COLUMN

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private List<DropForeignKeyConstraintChange>

Returns:

the list of generated DropForeignKeyConstraintChanges
generateChildren
(Database
the database type for which subchanges need to be generated
database
)

Iterates through all the FOREIGN KEYs of the target table and outputs a list of DropForeignKeyConstraintChanges for a given database type.

public SqlStatement[]
generateStatements(Database database)

Implements liquibase.change.Change.generateStatements.

Generates the SqlStatement objects required to run the change for the given database.

public boolean
public String
public String
public String
public String
getConfirmationMessage()

Implements liquibase.change.Change.getConfirmationMessage.

Confirmation message to be displayed after the change is executed.

public String
public void
setBaseTableCatalogName(String baseTableCatalogName)

public void
setBaseTableName(String baseTableName)

public void
setBaseTableSchemaName(String baseTableSchemaName)

Inherited from liquibase.change.AbstractChange:
checkStatuscreateChangeMetaDatacreateChangeParameterMetadatacreateDescriptionMetaDatacreateEmptyColumnConfigcreateExampleValueMetaDatacreateInversescreateMustEqualExistingMetaDatacreateRequiredDatabasesMetaDatacreateSerializationTypeMetaDatacreateSinceMetaDatacreateSupportedDatabasesMetaDatacustomLoadLogicequalsfinishInitializationgenerateCheckSumgenerateRollbackStatementsgenerateRollbackStatementsVolatilegetAffectedDatabaseObjectsgetChangeSetgetDescriptiongetExcludedFieldFiltersgetResourceAccessorgetSerializableFieldNamespacegetSerializableFieldsgetSerializableFieldTypegetSerializableFieldValuegetSerializedObjectNamehashCodeisInvalidPropertyloadmodifyserializeserializeValuesetChangeSetsetResourceAccessorshouldExecuteChangesupportssupportsRollbacktoStringvalidatewarn

Field Detail

baseTableCatalogNameback to summary
private String baseTableCatalogName
baseTableNameback to summary
private String baseTableName
baseTableSchemaNameback to summary
private String baseTableSchemaName

Constructor Detail

DropAllForeignKeyConstraintsChangeback to summary
public DropAllForeignKeyConstraintsChange()

Method Detail

generateChildrenback to summary
private List<DropForeignKeyConstraintChange> generateChildren(Database database)

Iterates through all the FOREIGN KEYs of the target table and outputs a list of DropForeignKeyConstraintChanges for a given database type.

Parameters
database:Database

the database type for which subchanges need to be generated

Returns:List<DropForeignKeyConstraintChange>

the list of generated DropForeignKeyConstraintChanges

generateStatementsback to summary
public SqlStatement[] generateStatements(Database database)

Implements liquibase.change.Change.generateStatements.

Doc from liquibase.change.Change.generateStatements.

Generates the SqlStatement objects required to run the change for the given database.

NOTE: This method may be called multiple times throughout the changelog execution process and may be called in documentation generation and other integration points as well.

If this method reads from the current database state or uses any other logic that will be affected by whether previous changeSets have ran or not, you must return true from generateStatementsVolatile.
Annotations
@Override
generateStatementsVolatileback to summary
public boolean generateStatementsVolatile(Database database)

Overrides liquibase.change.AbstractChange.generateStatementsVolatile.

Implements liquibase.change.Change.generateStatementsVolatile.

Doc from liquibase.change.AbstractChange.generateStatementsVolatile.

Implementation delegates logic to the liquibase.sqlgenerator.SqlGenerator#generateStatementsIsVolatile(Database) method on the SqlStatement objects returned by generateStatements. If zero or null SqlStatements are returned by generateStatements then this method returns false.

Annotations
@Override
getBaseTableCatalogNameback to summary
public String getBaseTableCatalogName()
Annotations
@DatabaseChangeProperty
mustEqualExisting:table.catalog
description:Name of the database catalog of the base table
since:3.0
getBaseTableNameback to summary
public String getBaseTableName()
Annotations
@DatabaseChangeProperty
mustEqualExisting:table
requiredForDatabase:all
description:Name of the table containing columns constrained by foreign keys
getBaseTableSchemaNameback to summary
public String getBaseTableSchemaName()
Annotations
@DatabaseChangeProperty
mustEqualExisting:table.schema
description:Name of the database schema of the base table
getConfirmationMessageback to summary
public String getConfirmationMessage()

Implements liquibase.change.Change.getConfirmationMessage.

Doc from liquibase.change.Change.getConfirmationMessage.

Confirmation message to be displayed after the change is executed. Should include relevant configuration settings to make it as helpful as possible. This method may be called outside the changelog execution process, such as in documentation generation.

Annotations
@Override
getSerializedObjectNamespaceback to summary
public String getSerializedObjectNamespace()

Overrides liquibase.change.AbstractChange.getSerializedObjectNamespace.

Implements liquibase.serializer.LiquibaseSerializable.getSerializedObjectNamespace.

Annotations
@Override
setBaseTableCatalogNameback to summary
public void setBaseTableCatalogName(String baseTableCatalogName)
setBaseTableNameback to summary
public void setBaseTableName(String baseTableName)
setBaseTableSchemaNameback to summary
public void setBaseTableSchemaName(String baseTableSchemaName)