createCompositeType

The createCompositeType defines a custom data structure that can be used in PostgreSQL tables, columns, and function signatures to organize related fields into a single logical structure.

Run createCompositeType

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 where you want to create a new type

Optional

typeName

String

Name of the type you want to create

Required

Nested tags

typeAttribute

String

Individual fields inside of the composite type.

Optional

createCompositeType examples

databaseChangeLog:
  - changeSet:
      id: 1
      author: itTest
      changes:
        - createCompositeType:
            typeName: myType
            typeAttributes:
              - typeAttribute:
                  name: attr0
                  type: int
              - typeAttribute:
                  name: Attr1
                  type: int
              - typeAttribute:
                  name: ATTR2
                  type: text
                  collation: en_US
              - typeAttribute:
                  name: att®3
                  type: line
              - typeAttribute:
                  name: attribute 4
                  type: real