Wrong datatypes for timestamps generated with generateChangeLog

Description

Generating an initial changelog.xml from an existing database with
— ./liquibase --changeLogFile=changelog.xml generateChangeLog
produces wrong datatypes for timestamps.

Postgres supports "TIMESTAMP WITH TIME ZONE", and "TIMESTAMP WITHOUT TIME ZONE". Throughout our database, we use only "TIMESTAMP WITHOUT TIMEZONE". Liquibase messes this up, and seems to know only "TIMESTAMP WITH TIME ZONE".

Example faulty changeset, the timestamps should be WITHOUT time zone:

<changeSet author="uwe (generated)" id="1251794347742-3">
<createTable schemaName="public" tableName="abstractuser">
<column name="id" type="int8">
<constraints nullable="false" primaryKey="true" primaryKeyName="abstractuser_pkey"/>
</column>
<column name="version" type="int8">
<constraints nullable="false"/>
</column>
<column name="lastchange" type="TIMESTAMP WITH TIME ZONE"/>
<column name="deletedsince" type="TIMESTAMP WITH TIME ZONE"/>
<column name="lockedsince" type="TIMESTAMP WITH TIME ZONE"/>

Environment

Ubuntu 9.04 (2.6.28-15 kernel), Postgres 8.3, Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_18-b02), postgresql-8.3-605.jdbc3.jar with org.postgresql.Driver as driver

Activity

Show:

Andrey December 27, 2017 at 2:46 PM

It's all cool. But what to do with old migrations (PostgreSQL) which have type `timestamp` in changeset and expected to be `timestamp with time zone` ? For now, most of my migrations is broken after upgrade from 2.x to 3.5.x.

Nathan Voxland May 29, 2014 at 2:22 PM

Fixed

Nathan Voxland April 11, 2014 at 9:11 PM

Hoping for a late april to early may release for 3.2.0

Mike Wazowski March 17, 2014 at 3:33 PM

great, thanks for the info. Is there already a release date for this version?

Dmitry Polovka March 17, 2014 at 11:08 AM

, yeap they will fix it in 3.2.0

Fixed

Details

Reporter

Components

Fix versions

Affects versions

Priority

Created September 1, 2009 at 8:50 AM
Updated December 27, 2017 at 2:46 PM
Resolved May 29, 2014 at 2:22 PM