DdlUtils
  1. DdlUtils
  2. DDLUTILS-208

Recreating a database does not start the new sequence at the value of the old table

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Labels:
      None
    • Environment:
      PostgreSQL 8.3.1

      Description

      PlatformImplBase.processChange(RecreateTableChange) does not migrate (autoincrement) sequences, but does call SqlBuilder.dropTables. PostgreSqlBuilder.dropTables explicitly drops the sequences:
      for (int idx = 0; idx < columns.length; idx++)

      { dropAutoIncrementSequence(table, columns[idx]); }

      (On the other hand, HsqlDbBuilder does not drop the sequence for instance.)
      The sequence is created again, but that causes 'duplicate' errors on the column using the sequence.

        Issue Links

          Activity

          Rijk van Haaften created issue -
          Thomas Dudziak made changes -
          Field Original Value New Value
          Link This issue relates to DDLUTILS-125 [ DDLUTILS-125 ]
          Thomas Dudziak made changes -
          Fix Version/s 1.3 [ 12313497 ]
          Component/s Core - PostgreSql [ 12311218 ]
          Summary PostgreSQL: RecreateTableChange loses autoIncrement Recreating a database does not start the new sequence at the value of the old table
          Fix Version/s 1.1 [ 12311984 ]

            People

            • Assignee:
              Thomas Dudziak
              Reporter:
              Rijk van Haaften
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Development