Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-12836

During upgrade, ALTER statements to change nullability of columns are not taking effect

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.1.1
    • Labels:
      None

      Description

      I think that the alterColumn in the upgrade catalog may not be working.

      dbAccessor.alterColumn("viewinstanceproperty", new DBColumnInfo("value",
          String.class, 2000, null, true));

      Performed a deployment of 1.6.1 and upgraded to 2.0.1. The column is still not nullable.

      ambari=> \d+ viewinstanceproperty;
                              Table "ambari.viewinstanceproperty"
             Column       |          Type           | Modifiers | Storage  | Description
      --------------------+-------------------------+-----------+----------+-------------
       view_name          | character varying(255)  | not null  | extended |
       view_instance_name | character varying(255)  | not null  | extended |
       name               | character varying(255)  | not null  | extended |
       value              | character varying(2000) | not null  | extended |
      

        Attachments

        1. AMBARI-12836_2.patch
          4 kB
          Dmytro Sen

          Issue Links

            Activity

              People

              • Assignee:
                dsen Dmytro Sen
                Reporter:
                dsen Dmytro Sen
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: