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 schemasybase, mssql, postgresql, sqlite, mysql
<changeSet author="liquibase-docs" id="renameView-example">
    <renameView catalogName="cat"
            newViewName="v_person"
            oldViewName="v_person"
            schemaName="public"/>
</changeSet>
changeSet:
  id: renameView-example
  author: liquibase-docs
  changes:
  - renameView:
      catalogName: cat
      newViewName: v_person
      oldViewName: v_person
      schemaName: public
{
  "changeSet": {
    "id": "renameView-example",
    "author": "liquibase-docs",
    "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
DerbyNot SupportedYes
FirebirdNot SupportedYes
H2Not SupportedYes
HyperSQLNot SupportedYes
InformixNot SupportedYes
MySQLSupportedYes
OracleSupportedYes
PostgreSQLSupportedYes
SQL ServerSupportedYes
SQLiteSupportedYes
SybaseSupportedYes
Sybase AnywhereNot SupportedYes

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