public class AddPrimaryKeyChange extends AbstractChange
LiquibaseSerializable.SerializationTypeNODENAME_COLUMNGENERIC_CHANGELOG_EXTENSION_NAMESPACE, GENERIC_SNAPSHOT_EXTENSION_NAMESPACE, STANDARD_CHANGELOG_NAMESPACE, STANDARD_SNAPSHOT_NAMESPACE| Constructor and Description |
|---|
AddPrimaryKeyChange() |
| Modifier and Type | Method and Description |
|---|---|
ChangeStatus |
checkStatus(Database database)
Validate that this change executed successfully against the given database.
|
protected Change[] |
createInverses()
Create inverse changes that can roll back this change.
|
SqlStatement[] |
generateStatements(Database database)
Generates the
SqlStatement objects required to run the change for the given database. |
String |
getCatalogName() |
Boolean |
getClustered() |
String |
getColumnNames() |
String |
getConfirmationMessage()
Confirmation message to be displayed after the change is executed.
|
String |
getConstraintName() |
String |
getForIndexCatalogName() |
String |
getForIndexName() |
String |
getForIndexSchemaName() |
String |
getSchemaName() |
String |
getSerializedObjectNamespace() |
String |
getTableName() |
String |
getTablespace() |
Boolean |
getValidate()
the VALIDATE keyword defines whether a primary key constraint on a column in a table
should be checked if it refers to a valid row or not.
|
void |
setCatalogName(String catalogName) |
void |
setClustered(Boolean clustered) |
void |
setColumnNames(String columnNames) |
void |
setConstraintName(String constraintName) |
void |
setForIndexCatalogName(String forIndexCatalogName) |
void |
setForIndexName(String forIndexName) |
void |
setForIndexSchemaName(String forIndexSchemaName) |
void |
setSchemaName(String schemaName) |
void |
setTableName(String tableName) |
void |
setTablespace(String tablespace) |
void |
setValidate(Boolean shouldValidate) |
createChangeMetaData, createChangeParameterMetadata, createDescriptionMetaData, createEmptyColumnConfig, createExampleValueMetaData, createMustEqualExistingMetaData, createRequiredDatabasesMetaData, createSerializationTypeMetaData, createSinceMetaData, createSupportedDatabasesMetaData, customLoadLogic, finishInitialization, generateCheckSum, generateRollbackStatements, generateRollbackStatementsVolatile, generateStatementsVolatile, getAffectedDatabaseObjects, getChangeSet, getDescription, getResourceAccessor, getSerializableFieldNamespace, getSerializableFields, getSerializableFieldType, getSerializableFieldValue, getSerializedObjectName, isInvalidProperty, load, serialize, serializeValue, setChangeSet, setResourceAccessor, supports, supportsRollback, toString, validate, warnpublic String getTableName()
public void setTableName(String tableName)
public String getCatalogName()
public void setCatalogName(String catalogName)
public String getSchemaName()
public void setSchemaName(String schemaName)
public String getColumnNames()
public void setColumnNames(String columnNames)
public String getConstraintName()
public void setConstraintName(String constraintName)
public String getForIndexName()
public void setForIndexName(String forIndexName)
public String getForIndexSchemaName()
public void setForIndexSchemaName(String forIndexSchemaName)
public String getForIndexCatalogName()
public void setForIndexCatalogName(String forIndexCatalogName)
public String getTablespace()
public void setTablespace(String tablespace)
public Boolean getClustered()
public void setClustered(Boolean clustered)
public Boolean getValidate()
public void setValidate(Boolean shouldValidate)
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 primary keys - only new data would be checked
to see if it complies with the constraint logic. The default state for primary keys is to
have 'ENABLE VALIDATE' set.public SqlStatement[] generateStatements(Database database)
ChangeSqlStatement 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 Change.generateStatementsVolatile(liquibase.database.Database).public ChangeStatus checkStatus(Database database)
ChangecheckStatus in interface ChangecheckStatus in class AbstractChangeprotected Change[] createInverses()
AbstractChangeAbstractChange.generateRollbackStatements(liquibase.database.Database) is overridden, this method may not be called.createInverses in class AbstractChange#supportsRollbackpublic String getConfirmationMessage()
Changepublic String getSerializedObjectNamespace()
getSerializedObjectNamespace in interface LiquibaseSerializablegetSerializedObjectNamespace in class AbstractChangeCopyright © 2019 Liquibase.org. All rights reserved.