ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmytro Sen" <d...@hortonworks.com>
Subject Review Request 37656: During upgrade, ALTER statements to change nullability of columns are not taking effect
Date Thu, 20 Aug 2015 17:05:20 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37656/
-----------------------------------------------------------

Review request for Ambari, Myroslav Papirkovskyy, Sumit Gupta, and Vitalyi Brodetskyi.


Bugs: AMBARI-12836
    https://issues.apache.org/jira/browse/AMBARI-12836


Repository: ambari


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 |


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java 19a516c 
  ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java 154645a 
  ambari-server/src/main/java/org/apache/ambari/server/orm/helpers/dbms/PostgresHelper.java
821b521 
  ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog211.java 595078f

  ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog211Test.java
b41b105 

Diff: https://reviews.apache.org/r/37656/diff/


Testing
-------

Unit tests passed

Manually tested upgrade on PostreSQL, MySql, Oracle


Thanks,

Dmytro Sen


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message