renameViewColumnsAndUpdateBody

Last updated: June 9, 2026

The renameViewColumnsAndUpdateBody change type renames one or more columns in a PostgreSQL view and simultaneously updates the view body SQL. It is emitted automatically by diff-changelog when it detects view column renames paired with a body change on PostgreSQL.

Note: Automatic rollback is supported. Liquibase reverses each column rename and restores the original view body SQL.

Available attributes

Attribute

Type

Required

Description

viewName

String

Yes

Name of the view to update.

oldColumnNames

String

Yes

Comma-separated list of current column names to rename.

newColumnNames

String

Yes

Comma-separated list of new column names, in the same order as oldColumnNames.

oldBody

String

Yes

The current view body SQL (used for rollback).

newBody

String

Yes

The new view body SQL to apply.

schemaName

String

No

Name of the schema containing the view.

catalogName

String

No

Name of the catalog containing the view.

Example code

loading

loading

loading

loading