Uploaded image for project: 'Liquibase Core'
  1. CORE-461

Wrong datatypes for timestamps generated with generateChangeLog

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: 1.9.4
    • Fix versions: 3.2.0
    • Components: Database Support
    • 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

    • Sprint:

      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"/>

        Attachments

          Activity

            People

            • Reporter:
              uwe Uwe Fricke (Inactive)
            • Votes:
              6 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: