Repository: ambari Updated Branches: refs/heads/trunk 7d5f20398 -> c3fb15c93
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/c3fb15c9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c3fb15c9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c3fb15c9 Branch: refs/heads/trunk Commit: c3fb15c93fa1406ad75246f8609b22b5bb879da2 Parents: 7d5f203 Author: Siddharth Wagle <[email protected]> Authored: Wed Mar 26 10:37:19 2014 -0700 Committer: Siddharth Wagle <[email protected]> Committed: Wed Mar 26 10:37:19 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/c3fb15c9/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();
