Top Description Fields Constructors Methods
liquibase.change.core

public Class DropPrimaryKeyChange

extends AbstractChange
Class Inheritance
Annotations
@DatabaseChange
name:dropPrimaryKey
description:Drops an existing primary key
priority:1
appliesTo:primaryKey
Imports
liquibase.change.*, liquibase.database.Database, liquibase.database.core.SQLiteDatabase, liquibase.exception.DatabaseException, .UnexpectedLiquibaseException, liquibase.snapshot.SnapshotGeneratorFactory, liquibase.statement.SqlStatement, liquibase.statement.core.DropPrimaryKeyStatement, liquibase.structure.core.Index, .PrimaryKey, java.util.List

Removes an existing primary key.

Field Summary

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ChangeStatus
checkStatus(Database database)

Overrides liquibase.change.AbstractChange.checkStatus.

Implements liquibase.change.Change.checkStatus.

Validate that this change executed successfully against the given database.

public SqlStatement[]
generateStatements(Database database)

Implements liquibase.change.Change.generateStatements.

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

private SqlStatement[]
public boolean
public String
public String
getConfirmationMessage()

Implements liquibase.change.Change.getConfirmationMessage.

Confirmation message to be displayed after the change is executed.

public String
public Boolean
public String
public String
public String
public void
setCatalogName(String catalogName)

public void
setConstraintName(String constraintName)

public void
setDropIndex(Boolean dropIndex)

public void
setSchemaName(String schemaName)

public void
setTableName(String tableName)

Inherited from liquibase.change.AbstractChange:
createChangeMetaDatacreateChangeParameterMetadatacreateDescriptionMetaDatacreateEmptyColumnConfigcreateExampleValueMetaDatacreateInversescreateMustEqualExistingMetaDatacreateRequiredDatabasesMetaDatacreateSerializationTypeMetaDatacreateSinceMetaDatacreateSupportedDatabasesMetaDatacustomLoadLogicequalsfinishInitializationgenerateCheckSumgenerateRollbackStatementsgenerateRollbackStatementsVolatilegetAffectedDatabaseObjectsgetChangeSetgetDescriptiongetExcludedFieldFiltersgetResourceAccessorgetSerializableFieldNamespacegetSerializableFieldsgetSerializableFieldTypegetSerializableFieldValuegetSerializedObjectNamehashCodeisInvalidPropertyloadmodifyserializeserializeValuesetChangeSetsetResourceAccessorshouldExecuteChangesupportssupportsRollbacktoStringvalidatewarn

Field Detail

catalogNameback to summary
private String catalogName
constraintNameback to summary
private String constraintName
dropIndexback to summary
private Boolean dropIndex
schemaNameback to summary
private String schemaName
tableNameback to summary
private String tableName

Constructor Detail

DropPrimaryKeyChangeback to summary
public DropPrimaryKeyChange()

Method Detail

checkStatusback to summary
public ChangeStatus checkStatus(Database database)

Overrides liquibase.change.AbstractChange.checkStatus.

Implements liquibase.change.Change.checkStatus.

Doc from liquibase.change.Change.checkStatus.

Validate that this change executed successfully against the given database. This will check that the update completed at a high level plus check details of the change. For example, a change to add a column will check that the column exists plus data type, default values, etc.

Annotations
@Override
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
generateStatementsForSQLiteDatabaseback to summary
private SqlStatement[] generateStatementsForSQLiteDatabase(Database database)
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
getCatalogNameback to summary
public String getCatalogName()
Annotations
@DatabaseChangeProperty
mustEqualExisting:primaryKey.catalog
description:Name of the database catalog
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
getConstraintNameback to summary
public String getConstraintName()
Annotations
@DatabaseChangeProperty
mustEqualExisting:primaryKey
description:Name of the primary key to drop
getDropIndexback to summary
public Boolean getDropIndex()
Annotations
@DatabaseChangeProperty
description:Whether to drop the index associated with the primary key
getSchemaNameback to summary
public String getSchemaName()
Annotations
@DatabaseChangeProperty
mustEqualExisting:primaryKey.schema
description:Name of the database schema
getSerializedObjectNamespaceback to summary
public String getSerializedObjectNamespace()

Overrides liquibase.change.AbstractChange.getSerializedObjectNamespace.

Implements liquibase.serializer.LiquibaseSerializable.getSerializedObjectNamespace.

Annotations
@Override
getTableNameback to summary
public String getTableName()
Annotations
@DatabaseChangeProperty
mustEqualExisting:primaryKey.table
description:Name of the table to drop the primary key from
setCatalogNameback to summary
public void setCatalogName(String catalogName)
setConstraintNameback to summary
public void setConstraintName(String constraintName)
setDropIndexback to summary
public void setDropIndex(Boolean dropIndex)
setSchemaNameback to summary
public void setSchemaName(String schemaName)
setTableNameback to summary
public void setTableName(String tableName)