Uploaded image for project: 'CloudStack'
  1. CloudStack
  2. CLOUDSTACK-10278

Adding a SQL table column is not Idempotent

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.10.0.0, 4.11.0.0
    • None
    • Install and Setup
    • Security Level: Public (Anyone can view this level - this is the default.)
    • None

    Description

      The SQL code to add a new column to a table in the META-INF/db/schema-41000to41100.sql script is not written in an idempotent way. When the upgrade is re-run, the code above causes a SQL error as reported on the user mailing list: 

      ERROR [c.c.u.d.ScriptRunner] (main:null) (logid
      Error executing: ALTER TABLE cloud.network_offerings ADD COLUMN for_vpc
      INT(1) NOT NULL DEFAULT 0

      This is a more generic problem for every version due to to the fact that it is not idempotent

       

      Attachments

        Activity

          People

            ernjvr Ernie Janse van Rensburg
            ernjvr Ernie Janse van Rensburg
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Time Spent - 10m Remaining Estimate - 3h 50m
                3h 50m
                Logged:
                Time Spent - 10m Remaining Estimate - 3h 50m
                10m