Skip to:
The Liquibase documentation notes that specifying a java.sql.Types.* type will be converted to the correct type, however, there is currently no support for the java.sql.Types.TIMEZONE_WITH_TIMESTAMP type.
java.sql.Types.TIMEZONE_WITH_TIMESTAMP
Using Liquibase 3.8.2 the following changeLog results in the approved_at column being created with the TIMESTAMP WITHOUT TIME ZONE type in PostgreSQL 12.1:
3.8.2
approved_at
TIMESTAMP WITHOUT TIME ZONE
12.1
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd"> <changeSet id="1" author="suilven"> <createTable tableName="test"> <column name="approved_at" type="java.sql.Types.TIMESTAMP_WITH_TIMEZONE"/> </createTable> </changeSet> </databaseChangeLog>
Based on the documentation, I would expect the approved_at column to be created with the TIMESTAMP WITH TIME ZONE type in PostgreSQL.
TIMESTAMP WITH TIME ZONE
PostgreSQL 12.1
The Liquibase documentation notes that specifying a java.sql.Types.* type will be converted to the correct type, however, there is currently no support for the
java.sql.Types.TIMEZONE_WITH_TIMESTAMP
type.Using Liquibase
3.8.2
the following changeLog results in theapproved_at
column being created with theTIMESTAMP WITHOUT TIME ZONE
type in PostgreSQL12.1
:<?xml version="1.0" encoding="UTF-8" standalone="no"?> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd"> <changeSet id="1" author="suilven"> <createTable tableName="test"> <column name="approved_at" type="java.sql.Types.TIMESTAMP_WITH_TIMEZONE"/> </createTable> </changeSet> </databaseChangeLog>
Based on the documentation, I would expect the
approved_at
column to be created with theTIMESTAMP WITH TIME ZONE
type in PostgreSQL.