Change: ‘alterSequence’

Alter properties of an existing sequence

Available Attributes

NameDescriptionRequired ForSupportsSince
catalogNameName of the catalogall3.0
incrementByNew amount the sequence should increment byinformix, postgresql, db2, oracle, firebird
maxValueNew maximum value for the sequenceinformix, postgresql, db2, oracle, firebird
minValueNew minimum value for the sequenceinformix, hsqldb, postgresql, db2, oracle, firebird
orderedDoes the sequence need to be guaranteed to be genererated inm the order of request?informix, hsqldb, postgresql, oracle, firebird, h2
schemaNameName of the schemaall
sequenceNameallall
<changeSet author="liquibase-docs" id="alterSequence-example">
    <alterSequence catalogName="cat"
            incrementBy="371717"
            maxValue="371717"
            minValue="371717"
            ordered="true"
            schemaName="public"
            sequenceName="seq_id"/>
</changeSet>
changeSet:
  id: alterSequence-example
  author: liquibase-docs
  changes:
  - alterSequence:
      catalogName: cat
      incrementBy: 371717
      maxValue: 371717
      minValue: 371717
      ordered: true
      schemaName: public
      sequenceName: seq_id
{
  "changeSet": {
    "id": "alterSequence-example",
    "author": "liquibase-docs",
    "changes": [
      {
        "alterSequence": {
          "catalogName": "cat",
          "incrementBy": 371717,
          "maxValue": 371717,
          "minValue": 371717,
          "ordered": true,
          "schemaName": "public",
          "sequenceName": "seq_id"
        }
      }]
    
  }
}

SQL Generated From Above Sample (Oracle)

ALTER SEQUENCE cat.seq_id INCREMENT BY 371717 MINVALUE 371717 MAXVALUE 371717 ORDER;

Database Support

DatabaseNotesAuto Rollback
DB2SupportedNo
DerbyNot SupportedNo
FirebirdSupportedNo
H2SupportedNo
HyperSQLSupportedNo
InformixSupportedNo
MySQLNot SupportedNo
OracleSupportedNo
PostgreSQLSupportedNo
SQL ServerNot SupportedNo
SQLiteNot SupportedNo
SybaseNot SupportedNo
Sybase AnywhereNot SupportedNo

Missing, incomplete or wrong information? Please send a pull request