Liquibase® version 3.8.1 is now available! Get it for free.
2018 XML Announcement

Change: ‘renameView’

Renames an existing view

Available Attributes

NameDescriptionRequired ForSupportsSince
catalogNameName of the catalogall3.0
newViewNameName to rename the view toallall
oldViewNameName of the view to renameallall
schemaNameName of the schemamariadb, sybase, sqlite, postgresql, ingres, mysql, mssql
<changeSet author="liquibase-docs"
        id="renameView-example"
        objectQuotingStrategy="LEGACY">
    <renameView catalogName="cat"
            newViewName="v_person"
            oldViewName="v_person"
            schemaName="public"/>
</changeSet>
changeSet:
  id: renameView-example
  author: liquibase-docs
  objectQuotingStrategy: LEGACY
  changes:
  - renameView:
      catalogName: cat
      newViewName: v_person
      oldViewName: v_person
      schemaName: public
{
  "changeSet": {
    "id": "renameView-example",
    "author": "liquibase-docs",
    "objectQuotingStrategy": "LEGACY",
    "changes": [
      {
        "renameView": {
          "catalogName": "cat",
          "newViewName": "v_person",
          "oldViewName": "v_person",
          "schemaName": "public"
        }
      }]
    
  }
}

SQL Generated From Above Sample (MySQL)

RENAME TABLE cat.v_person TO cat.v_person;

Database Support

DatabaseNotesAuto Rollback
DB2Not SupportedYes
DB2Not SupportedYes
DerbyNot SupportedYes
FirebirdNot SupportedYes
H2Not SupportedYes
HyperSQLNot SupportedYes
INGRESSupportedYes
InformixNot SupportedYes
MariaDBSupportedYes
MySQLSupportedYes
OracleSupportedYes
PostgreSQLSupportedYes
SQL ServerSupportedYes
SQLiteSupportedYes
SybaseSupportedYes
Sybase AnywhereNot SupportedYes