Change: ‘tagDatabase’

Applies a tag to the database for future rollback

Available Attributes

NameDescriptionRequired ForSupportsSince
tagTag to applyallall
<changeSet author="liquibase-docs" id="tagDatabase-example">
    <tagDatabase tag="version_1.3"/>
</changeSet>
changeSet:
  id: tagDatabase-example
  author: liquibase-docs
  changes:
  - tagDatabase:
      tag: version_1.3
{
  "changeSet": {
    "id": "tagDatabase-example",
    "author": "liquibase-docs",
    "changes": [
      {
        "tagDatabase": {
          "tag": "version_1.3"
        }
      }]
    
  }
}

SQL Generated From Above Sample (MySQL)

UPDATE DATABASECHANGELOG SET TAG = 'version_1.3' WHERE DATEEXECUTED = (SELECT MAX(DATEEXECUTED) FROM (SELECT DATEEXECUTED FROM DATABASECHANGELOG) AS X);

Database Support

DatabaseNotesAuto Rollback
DB2SupportedYes
DerbySupportedYes
FirebirdSupportedYes
H2SupportedYes
HyperSQLSupportedYes
InformixSupportedYes
MySQLSupportedYes
OracleSupportedYes
PostgreSQLSupportedYes
SQL ServerSupportedYes
SQLiteSupportedYes
SybaseSupportedYes
Sybase AnywhereSupportedYes

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