dropPrimaryKey

Drops an existing primary key

Available attributes

Name Description Required for Supports Since
catalogName Name of the catalog all
constraintName Name of the primary key firebird, informix, sybase all
dropIndex all
schemaName Name of the schema all
tableName Name of the table to drop the primary key of all all

XML example

<changeSet  author="liquibase-docs"  id="dropPrimaryKey-example">  
    <dropPrimaryKey  catalogName="cat"  
            constraintName="const_name"  
            dropIndex="true"  
            schemaName="public"  
            tableName="person"/>  
</changeSet>

YAML example

changeSet:  
  id:  dropPrimaryKey-example  
  author:  liquibase-docs  
  changes:  
  -  dropPrimaryKey:  
      catalogName:  cat  
      constraintName:  const_name  
      dropIndex:  true  
      schemaName:  public  
      tableName:  person

JSON example

{  "changeSet":  {  "id":  "dropPrimaryKey-example",  "author":  "liquibase-docs",  "changes":  [  {  "dropPrimaryKey":  {  "catalogName":  "cat",  "constraintName":  "const_name",  "dropIndex":  true,  "schemaName":  "public",  "tableName":  "person"  }  }]  }  }

SQL example

ALTER  TABLE  cat.person  DROP  PRIMARY  KEY;

Database support

Database Notes Auto rollback
DB2/LUW Supported No
DB2/z Supported No
Derby Supported No
Firebird Supported No
H2 Supported No
HyperSQL Supported No
INGRES Supported No
Informix Supported No
MariaDB Supported No
MySQL Supported No
Oracle Supported No
PostgreSQL Supported No
SQL Server Supported No
SQLite Supported No
Sybase Supported No
Sybase Anywhere Supported No