Repository: ambari Updated Branches: refs/heads/branch-1.5.0 f6ce36e3d -> c94a7084f
AMBARI-5225. Ambari upgrade test, CentOS5 failed to add host. (Myroslav P via swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c94a7084 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c94a7084 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c94a7084 Branch: refs/heads/branch-1.5.0 Commit: c94a7084f0384bdaae65eadf7276ca8f54d76897 Parents: f6ce36e Author: Siddharth Wagle <[email protected]> Authored: Wed Mar 26 10:36:38 2014 -0700 Committer: Siddharth Wagle <[email protected]> Committed: Wed Mar 26 10:36:38 2014 -0700 ---------------------------------------------------------------------- .../org/apache/ambari/server/upgrade/UpgradeCatalog150.java | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/c94a7084/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog150.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog150.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog150.java index ba19d19..8bbbfd4 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog150.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog150.java @@ -263,9 +263,14 @@ public class UpgradeCatalog150 extends AbstractUpgradeCatalog { dbAccessor.executeQuery("ALTER TABLE hostcomponentdesiredconfigmapping rename to hcdesiredconfigmapping;", true); dbAccessor.executeQuery("ALTER TABLE users ALTER column user_id DROP DEFAULT;", true); dbAccessor.executeQuery("ALTER TABLE users ALTER column ldap_user TYPE INTEGER USING CASE WHEN ldap_user=true THEN 1 ELSE 0 END;", true); + } + + if (Configuration.ORACLE_DB_NAME.equals(getDbType()) || + Configuration.POSTGRES_DB_NAME.equals(getDbType())) { dbAccessor.executeQuery("ALTER TABLE hosts DROP COLUMN disks_info;", true); } + //Move tables from ambarirca db to ambari db; drop ambarirca; Mysql if (getDbType().equals(Configuration.MYSQL_DB_NAME)) { String dbName = configuration.getServerJDBCSchemaName();
