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

NameDescriptionRequired ForSupportsSince
catalogNameName of the catalogall3.0
newSequenceNameNew name for the sequenceallall
oldSequenceNameName of the sequence to renameallall
schemaNameName of the schemaall
<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