How to create a TYPE in the liquibase changeset

Hi,

I am a newbie user of liquibase and have a basic quesiton about create database type. In oracle/postgres we have CREATE TYPE ddl statement to create a custom type. How do I do this in the liquibase change set? Is there a direct command (similar to createTable)?

newliquiuser

I’m concerned about this too. I maintain a SQL Server database that has custom types.
I searched the documentation and didn’t find a refactoring for this purpose, so, I used sql refactorings.

I’d like to know if this was introduced in the new version (3 as of date of this writing).

There is not direct support for yet. Like any "unsupported’ feature, is the best way to manage it within your changelog. The built in liquibase tags tend to be for features that are common across many database types and as you get into more database specific features you will often need to fall back to . 


Nathan

Hi everyone - This topic hasn’t been touched on for a long time. I wanted to see if Liquibase still does not support this feature? I have been trouble finding official documentation for the Pro version to see what “difftypes” it supports exactly.

There is not a “createType” change-type. You will need to use custom SQL to create a type.

Here is the list of the Pro change-types:

https://docs.liquibase.com/change-types/pro/home.html