Liquibase® version 3.8.5 is now available! Get it for free.
2018 XML Announcement
News All Previous Posts >>

Subscribe for email updates

- and/or -

Change: ‘renameSequence’

Renames an existing sequence

Available Attributes

NameDescription
catalogNameName of the catalog@ v3.0E.g. 'cat'
newSequenceNameNew name for the sequenceE.g. 'seq_id'
oldSequenceNameName of the sequence to renameE.g. 'seq_id'
schemaNameName of the schemaE.g. 'public'
<changeSet author="liquibase-docs" id="renameSequence-example">
    <renameSequence catalogName="cat"
            newSequenceName="seq_id"
            oldSequenceName="seq_id"
            schemaName="public"/>
</changeSet>
changeSet:
  id: renameSequence-example
  author: liquibase-docs
  changes:
  - renameSequence:
      catalogName: cat
      newSequenceName: seq_id
      oldSequenceName: seq_id
      schemaName: public
{
  "changeSet": {
    "id": "renameSequence-example",
    "author": "liquibase-docs",
    "changes": [
      {
        "renameSequence": {
          "catalogName": "cat",
          "newSequenceName": "seq_id",
          "oldSequenceName": "seq_id",
          "schemaName": "public"
        }
      }]
    
  }
}

SQL Generated From Above Sample (SQL Server)

SP_RENAME seq_id ,
seq_id;

Database Support

DatabaseNotesAuto Rollback
DB2/LUWNot SupportedYes
DB2/zNot SupportedYes
DerbySupportedYes
FirebirdNot SupportedYes
H2Not SupportedYes
HyperSQLNot SupportedYes
INGRESNot SupportedYes
InformixNot SupportedYes
MariaDBNot SupportedYes
MySQLNot SupportedYes
OracleSupportedYes
PostgreSQLSupportedYes
SQL ServerSupportedYes
SQLiteNot SupportedYes
SybaseNot SupportedYes
Sybase AnywhereSupportedYes