Package liquibase.statement.core
Class AddForeignKeyConstraintStatement
java.lang.Object
liquibase.statement.AbstractSqlStatement
liquibase.statement.core.AddForeignKeyConstraintStatement
- All Implemented Interfaces:
SqlStatement
-
Field Summary
Fields inherited from interface liquibase.statement.SqlStatement
EMPTY_SQL_STATEMENT
-
Constructor Summary
ConstructorDescriptionAddForeignKeyConstraintStatement
(String constraintName, String baseTableCatalogName, String baseTableSchemaName, String baseTableName, ColumnConfig[] baseColumns, String referencedTableCatalogName, String referencedTableSchemaName, String referencedTableName, ColumnConfig[] referencedColumns) -
Method Summary
Modifier and TypeMethodDescriptionsetDeferrable
(boolean deferrable) setInitiallyDeferred
(boolean initiallyDeferred) setOnDelete
(String deleteRule) setOnUpdate
(String updateRule) setShouldValidate
(boolean shouldValidate) boolean
In Oracle PL/SQL, the VALIDATE keyword defines whether a foreign key constraint on a column in a table should be checked if it refers to a valid row or not.Methods inherited from class liquibase.statement.AbstractSqlStatement
continueOnError, setContinueOnError, skipOnUnsupported
-
Constructor Details
-
AddForeignKeyConstraintStatement
public AddForeignKeyConstraintStatement(String constraintName, String baseTableCatalogName, String baseTableSchemaName, String baseTableName, ColumnConfig[] baseColumns, String referencedTableCatalogName, String referencedTableSchemaName, String referencedTableName, ColumnConfig[] referencedColumns)
-
-
Method Details
-
getBaseColumnNames
-
getReferencedColumnNames
-
setDeferrable
-
setInitiallyDeferred
-
setOnUpdate
-
setOnDelete
-
shouldValidate
public boolean shouldValidate()In Oracle PL/SQL, the VALIDATE keyword defines whether a foreign key constraint on a column in a table should be checked if it refers to a valid row or not.- Returns:
- true if ENABLE VALIDATE (this is the default), or false if ENABLE NOVALIDATE.
-
setShouldValidate
- Parameters:
shouldValidate
- - if shouldValidate is set to FALSE then the constraint will be created with the 'ENABLE NOVALIDATE' mode. This means the constraint would be created, but that no check will be done to ensure old data has valid foreign keys - only new data would be checked to see if it complies with the constraint logic. The default state for foreign keys is to have 'ENABLE VALIDATE' set.
-