dropCompositeType

The dropCompositeType Change Type removes a defined composite type in your PostgreSQL tables, columns, and function signatures.

Run dropCompositeType

To run this Change Type, follow these steps:

  1. Add the Change Type to your changeset, as shown in the examples on this page.

  2. Specify any required attributes. Use the table on this page to see which ones your database requires.

  3. Deploy your changeset by running the update command:liquibase update

Available attributes

Name

Type

Description

Requirement

catalogName

String

Name of the catalog.

Optional

schemaName

String

Name of the schema that contains the composite type you want to drop.

Optional

typeName

String

Name of the type you want to drop.

Required

ifExists

Boolean

Drop objects only if they exist in the database.

Optional

onDelete

String

Set to CASCADE or RESTRICT. CASCADE automatically drops objects that depend on the type. RESTRICT does not drop the type if any objects depend on it. Default: RESTRICT.

Optional

databaseChangeLog:
  - changeSet:
      id: 1
      author: itTest
      changes:
        - createCompositeType:
            typeName: myDelType
            typeAttributes:
              - typeAttribute:
                  name: attr1
                  type: int
              - typeAttribute:
                  name: attr2
                  type: text
                  collation: en_US
        - dropCompositeType:
            typeName: myDelType
            ifExists: true
            onDelete: CASCADE
      rollback: empty