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:
Add the Change Type to your changeset, as shown in the examples on this page.
Specify any required attributes. Use the table on this page to see which ones your database requires.
Deploy your changeset by running the
update
command:liquibase update
Available attributes
Name | Type | Description | Requirement |
| String | Name of the catalog | Optional |
| String | Name of the schema where you want to create a new type | Optional |
| String | Name of the type you want to create | Required |
Nested tags
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