How the view SQL is Generated by Liquibase Pro

Liquibase Pro generates view definitions using the SQL returned to it from the database. Liquibase Pro does not change the content of the SQL provided by the database and can result in the database or schema prepending object names. If the database or schema is included in the view definition, an update can produce unexpected results.

Troubleshooting Issues

A fully qualified object name in a view can result in unexpected behavior during an update. The reasons are:

  • The update fails because the fully qualified object does not exist on the database where an update is executed.
  • The update succeeds but applies the view to another database that the user has permissions to modify. There is no impact of fully qualified object names if every database in your pipeline is replicated with the same database names.

Liquibase Pro best practice is to review changelogs generated with the generate-changelog command prior to doing an update. If views are included in the generated changelog, verify that the generated view SQL is correct for your environment.

Related Links