ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [03/12] git commit: AMBARI-6900. Upgrade DB Tests Fail. value column problem. (mahadev)
Date Tue, 19 Aug 2014 03:39:56 GMT
AMBARI-6900. Upgrade DB Tests Fail. value column problem. (mahadev)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a3749ee3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a3749ee3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a3749ee3

Branch: refs/heads/branch-alerts-dev
Commit: a3749ee38afeaef18e5192d5764d0742e9cc0c6a
Parents: b445ec8
Author: Mahadev Konar <mahadev@apache.org>
Authored: Mon Aug 18 13:00:52 2014 -0700
Committer: Jonathan Hurley <jhurley@hortonworks.com>
Committed: Mon Aug 18 23:12:34 2014 -0400

----------------------------------------------------------------------
 .../server/orm/entities/AlertCurrentEntity.java |  2 +-
 .../orm/entities/AlertDefinitionEntity.java     |  2 +-
 .../server/orm/entities/AlertGroupEntity.java   |  2 +-
 .../server/orm/entities/AlertHistoryEntity.java |  2 +-
 .../server/orm/entities/AlertNoticeEntity.java  |  2 +-
 .../server/orm/entities/AlertTargetEntity.java  |  2 +-
 .../orm/entities/ClusterConfigEntity.java       |  2 +-
 .../server/orm/entities/ClusterEntity.java      |  2 +-
 .../server/orm/entities/ConfigGroupEntity.java  |  2 +-
 .../ambari/server/orm/entities/GroupEntity.java |  2 +-
 .../orm/entities/HostRoleCommandEntity.java     |  2 +-
 .../server/orm/entities/MemberEntity.java       |  2 +-
 .../server/orm/entities/PermissionEntity.java   |  2 +-
 .../server/orm/entities/PrincipalEntity.java    |  2 +-
 .../orm/entities/PrincipalTypeEntity.java       |  2 +-
 .../server/orm/entities/PrivilegeEntity.java    |  2 +-
 .../entities/RequestOperationLevelEntity.java   |  2 +-
 .../entities/RequestResourceFilterEntity.java   |  2 +-
 .../orm/entities/RequestScheduleEntity.java     |  2 +-
 .../server/orm/entities/ResourceEntity.java     |  2 +-
 .../server/orm/entities/ResourceTypeEntity.java |  2 +-
 .../orm/entities/ServiceConfigEntity.java       |  2 +-
 .../ambari/server/orm/entities/UserEntity.java  |  2 +-
 .../server/orm/entities/ViewEntityEntity.java   |  2 +-
 .../server/orm/entities/ViewInstanceEntity.java |  2 +-
 .../server/upgrade/UpgradeCatalog170.java       | 85 +++++++++-----------
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  | 52 ++++++------
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 52 ++++++------
 .../resources/Ambari-DDL-Postgres-CREATE.sql    |  4 +-
 .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql     |  4 +-
 30 files changed, 121 insertions(+), 126 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertCurrentEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertCurrentEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertCurrentEntity.java
index d00cbc7..cde61f2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertCurrentEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertCurrentEntity.java
@@ -43,7 +43,7 @@ import org.apache.ambari.server.state.MaintenanceState;
  */
 @Entity
 @Table(name = "alert_current")
-@TableGenerator(name = "alert_current_id_generator", table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value", pkColumnValue = "alert_current_id_seq", initialValue = 0, allocationSize = 1)
+@TableGenerator(name = "alert_current_id_generator", table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value", pkColumnValue = "alert_current_id_seq", initialValue = 0, allocationSize = 1)
 @NamedQueries({
     @NamedQuery(name = "AlertCurrentEntity.findAll", query = "SELECT alert FROM AlertCurrentEntity alert"),
     @NamedQuery(name = "AlertCurrentEntity.findByService", query = "SELECT alert FROM AlertCurrentEntity alert JOIN alert.alertHistory history WHERE history.clusterId = :clusterId AND history.serviceName = :serviceName"),

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertDefinitionEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertDefinitionEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertDefinitionEntity.java
index 66a3af0..4e8b3b9 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertDefinitionEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertDefinitionEntity.java
@@ -48,7 +48,7 @@ import org.apache.ambari.server.state.alert.Scope;
 @Entity
 @Table(name = "alert_definition", uniqueConstraints = @UniqueConstraint(columnNames = {
     "cluster_id", "definition_name" }))
-@TableGenerator(name = "alert_definition_id_generator", table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value", pkColumnValue = "alert_definition_id_seq", initialValue = 0, allocationSize = 1)
+@TableGenerator(name = "alert_definition_id_generator", table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value", pkColumnValue = "alert_definition_id_seq", initialValue = 0, allocationSize = 1)
 @NamedQueries({
     @NamedQuery(name = "AlertDefinitionEntity.findAll", query = "SELECT ad FROM AlertDefinitionEntity ad"),
     @NamedQuery(name = "AlertDefinitionEntity.findAllInCluster", query = "SELECT ad FROM AlertDefinitionEntity ad WHERE ad.clusterId = :clusterId"),

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java
index 89f040c..976855e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java
@@ -43,7 +43,7 @@ import javax.persistence.UniqueConstraint;
 @Entity
 @Table(name = "alert_group", uniqueConstraints = @UniqueConstraint(columnNames = {
     "cluster_id", "group_name" }))
-@TableGenerator(name = "alert_group_id_generator", table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value", pkColumnValue = "alert_group_id_seq", initialValue = 0, allocationSize = 1)
+@TableGenerator(name = "alert_group_id_generator", table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value", pkColumnValue = "alert_group_id_seq", initialValue = 0, allocationSize = 1)
 @NamedQueries({
     @NamedQuery(name = "AlertGroupEntity.findAll", query = "SELECT alertGroup FROM AlertGroupEntity alertGroup"),
     @NamedQuery(name = "AlertGroupEntity.findAllInCluster", query = "SELECT alertGroup FROM AlertGroupEntity alertGroup WHERE alertGroup.clusterId = :clusterId"),

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertHistoryEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertHistoryEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertHistoryEntity.java
index 7855de4..a671ae1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertHistoryEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertHistoryEntity.java
@@ -42,7 +42,7 @@ import org.apache.ambari.server.state.AlertState;
  */
 @Entity
 @Table(name = "alert_history")
-@TableGenerator(name = "alert_history_id_generator", table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value", pkColumnValue = "alert_history_id_seq", initialValue = 0, allocationSize = 1)
+@TableGenerator(name = "alert_history_id_generator", table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value", pkColumnValue = "alert_history_id_seq", initialValue = 0, allocationSize = 1)
 @NamedQueries({
     @NamedQuery(name = "AlertHistoryEntity.findAll", query = "SELECT alertHistory FROM AlertHistoryEntity alertHistory"),
     @NamedQuery(name = "AlertHistoryEntity.findAllInCluster", query = "SELECT alertHistory FROM AlertHistoryEntity alertHistory WHERE alertHistory.clusterId = :clusterId"),

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java
index 41bc1d8..af541cd 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java
@@ -42,7 +42,7 @@ import org.apache.ambari.server.state.NotificationState;
  */
 @Entity
 @Table(name = "alert_notice")
-@TableGenerator(name = "alert_notice_id_generator", table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value", pkColumnValue = "alert_notice_id_seq", initialValue = 0, allocationSize = 1)
+@TableGenerator(name = "alert_notice_id_generator", table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value", pkColumnValue = "alert_notice_id_seq", initialValue = 0, allocationSize = 1)
 @NamedQueries({
     @NamedQuery(name = "AlertNoticeEntity.findAll", query = "SELECT notice FROM AlertNoticeEntity notice"),
     @NamedQuery(name = "AlertNoticeEntity.removeByDefinitionId", query = "DELETE FROM AlertNoticeEntity notice WHERE notice.alertHistory.alertDefinition.definitionId = :definitionId") })

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java
index 74da92c..89728e5 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java
@@ -43,7 +43,7 @@ import javax.persistence.TableGenerator;
  */
 @Entity
 @Table(name = "alert_target")
-@TableGenerator(name = "alert_target_id_generator", table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value", pkColumnValue = "alert_target_id_seq", initialValue = 0, allocationSize = 1)
+@TableGenerator(name = "alert_target_id_generator", table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value", pkColumnValue = "alert_target_id_seq", initialValue = 0, allocationSize = 1)
 @NamedQueries({
     @NamedQuery(name = "AlertTargetEntity.findAll", query = "SELECT alertTarget FROM AlertTargetEntity alertTarget"),
     @NamedQuery(name = "AlertTargetEntity.findByName", query = "SELECT alertTarget FROM AlertTargetEntity alertTarget WHERE alertTarget.targetName = :targetName"), })

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
index f513ee2..da8fac6 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
@@ -26,7 +26,7 @@ import java.util.Collection;
   uniqueConstraints = {@UniqueConstraint(name = "UQ_config_type_tag", columnNames = {"cluster_id", "type_name", "version_tag"}),
     @UniqueConstraint(name = "UQ_config_type_version", columnNames = {"cluster_id", "type_name", "version"})})
 @TableGenerator(name = "config_id_generator",
-  table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value"
+  table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value"
   , pkColumnValue = "config_id_seq"
   , initialValue = 1
   , allocationSize = 1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java
index 942c868..292a4d3 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java
@@ -38,7 +38,7 @@ import static org.apache.commons.lang.StringUtils.defaultString;
 })
 @Entity
 @TableGenerator(name = "cluster_id_generator",
-    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value"
+    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value"
     , pkColumnValue = "cluster_id_seq"
     , initialValue = 1
     , allocationSize = 1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ConfigGroupEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ConfigGroupEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ConfigGroupEntity.java
index 705adfd..a5e293c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ConfigGroupEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ConfigGroupEntity.java
@@ -47,7 +47,7 @@ import java.util.Collection;
     "WHERE configgroup.tag=:tagName")
 })
 @TableGenerator(name = "configgroup_id_generator",
-  table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value"
+  table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value"
   , pkColumnValue = "configgroup_id_seq"
   , initialValue = 1
   , allocationSize = 1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/GroupEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/GroupEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/GroupEntity.java
index 5349f1e..9c3411e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/GroupEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/GroupEntity.java
@@ -40,7 +40,7 @@ import javax.persistence.UniqueConstraint;
 @TableGenerator(name = "group_id_generator",
     table = "ambari_sequences",
     pkColumnName = "sequence_name",
-    valueColumnName = "value",
+    valueColumnName = "sequence_value",
     pkColumnValue = "group_id_seq",
     initialValue = 1,
     allocationSize = 1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostRoleCommandEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostRoleCommandEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostRoleCommandEntity.java
index 490b289..599156a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostRoleCommandEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostRoleCommandEntity.java
@@ -48,7 +48,7 @@ import org.apache.commons.lang.ArrayUtils;
 @Table(name = "host_role_command")
 @Entity
 @TableGenerator(name = "host_role_command_id_generator",
-    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value"
+    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value"
     , pkColumnValue = "host_role_command_id_seq"
     , initialValue = 1
     , allocationSize = 50

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/MemberEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/MemberEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/MemberEntity.java
index 04b1a87..5d9e6b1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/MemberEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/MemberEntity.java
@@ -33,7 +33,7 @@ import javax.persistence.UniqueConstraint;
 @TableGenerator(name = "member_id_generator",
     table = "ambari_sequences",
     pkColumnName = "sequence_name",
-    valueColumnName = "value",
+    valueColumnName = "sequence_value",
     pkColumnValue = "member_id_seq",
     initialValue = 1,
     allocationSize = 1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PermissionEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PermissionEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PermissionEntity.java
index 4702d05..6d1d873 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PermissionEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PermissionEntity.java
@@ -36,7 +36,7 @@ import javax.persistence.TableGenerator;
 @Table(name = "adminpermission")
 @Entity
 @TableGenerator(name = "permission_id_generator",
-    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value"
+    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value"
     , pkColumnValue = "permission_id_seq"
     , initialValue = 5
     , allocationSize = 1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalEntity.java
index 51438cd..e0767a3 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalEntity.java
@@ -39,7 +39,7 @@ import javax.persistence.TableGenerator;
 @Table(name = "adminprincipal")
 @Entity
 @TableGenerator(name = "principal_id_generator",
-    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value"
+    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value"
     , pkColumnValue = "principal_id_seq"
     , initialValue = 2
     , allocationSize = 1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalTypeEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalTypeEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalTypeEntity.java
index 2f37592..f7c0aa1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalTypeEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalTypeEntity.java
@@ -26,7 +26,7 @@ import javax.persistence.*;
 @Table(name = "adminprincipaltype")
 @Entity
 @TableGenerator(name = "principal_type_id_generator",
-    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value"
+    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value"
     , pkColumnValue = "principal_type_id_seq"
     , initialValue = 3
     , allocationSize = 1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrivilegeEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrivilegeEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrivilegeEntity.java
index fe97c7d..d86a22c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrivilegeEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrivilegeEntity.java
@@ -36,7 +36,7 @@ import javax.persistence.TableGenerator;
 @Table(name = "adminprivilege")
 @Entity
 @TableGenerator(name = "privilege_id_generator",
-    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value"
+    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value"
     , pkColumnValue = "privilege_id_seq"
     , initialValue = 1
     , allocationSize = 1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestOperationLevelEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestOperationLevelEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestOperationLevelEntity.java
index b7b3133..9f8453c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestOperationLevelEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestOperationLevelEntity.java
@@ -36,7 +36,7 @@ import javax.persistence.TableGenerator;
 @Entity
 @Table(name = "requestoperationlevel")
 @TableGenerator(name = "operation_level_id_generator",
-  table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value"
+  table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value"
   , pkColumnValue = "operation_level_id_seq"
   , initialValue = 1
   , allocationSize = 1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestResourceFilterEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestResourceFilterEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestResourceFilterEntity.java
index 4307d08..0dc7807 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestResourceFilterEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestResourceFilterEntity.java
@@ -32,7 +32,7 @@ import javax.persistence.TableGenerator;
 @Entity
 @Table(name = "requestresourcefilter")
 @TableGenerator(name = "resourcefilter_id_generator",
-  table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value"
+  table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value"
   , pkColumnValue = "resourcefilter_id_seq"
   , initialValue = 1
   , allocationSize = 1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestScheduleEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestScheduleEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestScheduleEntity.java
index 60df7b4..5ed3480 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestScheduleEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestScheduleEntity.java
@@ -43,7 +43,7 @@ import java.util.List;
       "WHERE reqSchedule.status=:status")
 })
 @TableGenerator(name = "schedule_id_generator",
-  table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value"
+  table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value"
   , pkColumnValue = "requestschedule_id_seq"
   , initialValue = 1
   , allocationSize = 1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceEntity.java
index 28c7fde..0b7e591 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceEntity.java
@@ -26,7 +26,7 @@ import javax.persistence.*;
 @Table(name = "adminresource")
 @Entity
 @TableGenerator(name = "resource_id_generator",
-    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value"
+    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value"
     , pkColumnValue = "resource_id_seq"
     , initialValue = 2
     , allocationSize = 1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceTypeEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceTypeEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceTypeEntity.java
index 0bcc6ab..6cebf08 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceTypeEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceTypeEntity.java
@@ -26,7 +26,7 @@ import javax.persistence.*;
 @Table(name = "adminresourcetype")
 @Entity
 @TableGenerator(name = "resource_type_id_generator",
-    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value"
+    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value"
     , pkColumnValue = "resource_type_id_seq"
     , initialValue = 4
     , allocationSize = 1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java
index ce47e28..86557ac 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java
@@ -37,7 +37,7 @@ import java.util.List;
 @Entity
 @Table(name = "serviceconfig")
 @TableGenerator(name = "service_config_id_generator",
-  table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value"
+  table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value"
   , pkColumnValue = "service_config_id_seq"
   , initialValue = 1
   , allocationSize = 1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UserEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UserEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UserEntity.java
index 90410be..a6c5548 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UserEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UserEntity.java
@@ -29,7 +29,7 @@ import java.util.Set;
     @NamedQuery(name = "ldapUserByName", query = "SELECT user FROM UserEntity user where lower(user.userName)=:username AND user.ldapUser=true")
 })
 @TableGenerator(name = "user_id_generator",
-    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value"
+    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value"
     , pkColumnValue = "user_id_seq"
     , initialValue = 2
     , allocationSize = 1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntityEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntityEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntityEntity.java
index cae57fc..30d6e23 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntityEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntityEntity.java
@@ -36,7 +36,7 @@ import javax.persistence.TableGenerator;
 @Table(name = "viewentity")
 @Entity
 @TableGenerator(name = "viewentity_id_generator",
-    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value"
+    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value"
     , pkColumnValue = "viewentity_id_seq"
     , initialValue = 1
     , allocationSize = 50

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java
index 3f1cd8f..66917e7 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java
@@ -61,7 +61,7 @@ import org.apache.ambari.view.ViewInstanceDefinition;
 @NamedQuery(name = "allViewInstances",
   query = "SELECT viewInstance FROM ViewInstanceEntity viewInstance")
 @TableGenerator(name = "view_instance_id_generator",
-  table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "value"
+  table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value"
   , pkColumnValue = "view_instance_id_seq"
   , initialValue = 1
   , allocationSize = 1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
index 33a87a7..bef01c1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
@@ -129,8 +129,11 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
 
   @Override
   protected void executeDDLUpdates() throws AmbariException, SQLException {
-    List<DBColumnInfo> columns;
+    // needs to be executed first
+    renameSequenceValueColumnName();
+
     String dbType = getDbType();
+    List<DBColumnInfo> columns;
 
     // add group and members tables
     columns = new ArrayList<DBColumnInfo>();
@@ -342,62 +345,37 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
       new String[]{"cluster_id", "type_name", "version_tag"}, true);
 
 
+    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, sequence_value) VALUES('alert_definition_id_seq', 0)", false);
 
-    //service config version sequences
-    String valueColumnName = "\"value\"";
-    if (Configuration.ORACLE_DB_NAME.equals(dbType)
-      || Configuration.MYSQL_DB_NAME.equals(dbType)) {
-      valueColumnName = "value";
-    }
-
-    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, "
-            + valueColumnName + ") " + "VALUES('alert_definition_id_seq', 0)",
-            false);
-
-    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, "
-            + valueColumnName + ") " + "VALUES('alert_group_id_seq', 0)", false);
+    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, sequence_value) VALUES('alert_group_id_seq', 0)", false);
 
-    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, "
-            + valueColumnName + ") " + "VALUES('alert_target_id_seq', 0)", false);
+    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, sequence_value) VALUES('alert_target_id_seq', 0)", false);
 
-    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, "
-            + valueColumnName + ") " + "VALUES('alert_history_id_seq', 0)", false);
+    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, sequence_value) VALUES('alert_history_id_seq', 0)", false);
 
-    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, "
-            + valueColumnName + ") " + "VALUES('alert_notice_id_seq', 0)", false);
+    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, sequence_value) VALUES('alert_notice_id_seq', 0)", false);
 
-    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, "
-            + valueColumnName + ") " + "VALUES('alert_current_id_seq', 0)", false);
+    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, sequence_value) VALUES('alert_current_id_seq', 0)", false);
 
-    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, "
-            + valueColumnName + ") " + "VALUES('group_id_seq', 1)", false);
+    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, sequence_value) VALUES('group_id_seq', 1)", false);
 
-    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, "
-            + valueColumnName + ") " + "VALUES('member_id_seq', 1)", false);
+    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, sequence_value) VALUES('member_id_seq', 1)", false);
 
-    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, "
-            + valueColumnName + ") " + "VALUES('resource_type_id_seq', 4)", false);
+    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, sequence_value) VALUES('resource_type_id_seq', 4)", false);
 
-    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, "
-            + valueColumnName + ") " + "VALUES('resource_id_seq', 2)", false);
+    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, sequence_value) VALUES('resource_id_seq', 2)", false);
 
-    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, "
-            + valueColumnName + ") " + "VALUES('principal_type_id_seq', 3)", false);
+    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, sequence_value) VALUES('principal_type_id_seq', 3)", false);
 
-    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, "
-            + valueColumnName + ") " + "VALUES('principal_id_seq', 2)", false);
+    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, sequence_value) VALUES('principal_id_seq', 2)", false);
 
-    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, "
-            + valueColumnName + ") " + "VALUES('permission_id_seq', 5)", false);
+    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, sequence_value) VALUES('permission_id_seq', 5)", false);
 
-    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, "
-            + valueColumnName + ") " + "VALUES('privilege_id_seq', 1)", false);
+    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, sequence_value) VALUES('privilege_id_seq', 1)", false);
 
-    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, "
-            + valueColumnName + ") " + "VALUES('service_config_id_seq', 1)", false);
+    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, sequence_value) VALUES('service_config_id_seq', 1)", false);
 
-    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, "
-      + valueColumnName + ") " + "VALUES('service_config_application_id_seq', 1)", false);
+    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, sequence_value) VALUES('service_config_application_id_seq', 1)", false);
 
     long count = 1;
     ResultSet resultSet = null;
@@ -412,8 +390,7 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
       }
     }
 
-    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, "
-      + valueColumnName + ") " + "VALUES('config_id_seq', " + count + ")", false);
+    dbAccessor.executeQuery("INSERT INTO ambari_sequences(sequence_name, sequence_value) VALUES('config_id_seq', " + count + ")", false);
 
     dbAccessor.addFKConstraint("users", "FK_users_principal_id", "principal_id", "adminprincipal", "principal_id", true);
     dbAccessor.addFKConstraint("clusters", "FK_clusters_resource_id", "resource_id", "adminresource", "resource_id", true);
@@ -433,6 +410,24 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
     dbAccessor.executeQuery("ALTER TABLE adminpermission ADD CONSTRAINT UQ_perm_name_resource_type_id UNIQUE (permission_name, resource_type_id)");
   }
 
+  /**
+   * Note that you can't use dbAccessor.renameColumn(...) here as the column name is a reserved word and
+   * thus requires custom approach for every database type.
+   */
+  private void renameSequenceValueColumnName() throws AmbariException, SQLException {
+    final String dbType = getDbType();
+    if (Configuration.MYSQL_DB_NAME.equals(dbType)) {
+      dbAccessor.executeQuery("ALTER TABLE ambari_sequences RENAME COLUMN \"value\" to sequence_value DECIMAL(38) NOT NULL");
+    } else if (Configuration.DERBY_DB_NAME.equals(dbType)) {
+      dbAccessor.executeQuery("RENAME COLUMN ambari_sequences.\"value\" to sequence_value");
+    } else if (Configuration.ORACLE_DB_NAME.equals(dbType)) {
+      dbAccessor.executeQuery("ALTER TABLE ambari_sequences RENAME COLUMN value to sequence_value");
+    } else {
+      // Postgres
+      dbAccessor.executeQuery("ALTER TABLE ambari_sequences RENAME COLUMN \"value\" to sequence_value");
+    }
+  }
+
   private void populateConfigVersions() throws SQLException {
     ResultSet resultSet = dbAccessor.executeSelect("SELECT DISTINCT type_name FROM clusterconfig ");
     Set<String> configTypes = new HashSet<String>();
@@ -742,7 +737,7 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
     updateConfigurationProperties("hbase-env",
         Collections.singletonMap("hbase_regionserver_xmn_ratio", "0.2"), false,
         false);
-    
+
     updateConfigurationProperties("yarn-env",
         Collections.singletonMap("min_user_id", "1000"), false,
         false);

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
index 00f0e7c..b39ca5d 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
@@ -55,7 +55,7 @@ CREATE TABLE hostconfigmapping (create_timestamp BIGINT NOT NULL, host_name VARC
 CREATE TABLE metainfo (`metainfo_key` VARCHAR(255), `metainfo_value` LONGTEXT, PRIMARY KEY (`metainfo_key`));
 CREATE TABLE ClusterHostMapping (cluster_id BIGINT NOT NULL, host_name VARCHAR(255) NOT NULL, PRIMARY KEY (cluster_id, host_name));
 CREATE TABLE user_roles (role_name VARCHAR(255) NOT NULL, user_id INTEGER NOT NULL, PRIMARY KEY (role_name, user_id));
-CREATE TABLE ambari_sequences (sequence_name VARCHAR(255), value DECIMAL(38) NOT NULL, PRIMARY KEY (sequence_name));
+CREATE TABLE ambari_sequences (sequence_name VARCHAR(255), sequence_value DECIMAL(38) NOT NULL, PRIMARY KEY (sequence_name));
 CREATE TABLE confgroupclusterconfigmapping (config_group_id BIGINT NOT NULL, cluster_id BIGINT NOT NULL, config_type VARCHAR(255) NOT NULL, version_tag VARCHAR(255) NOT NULL, user_name VARCHAR(255) DEFAULT '_db', create_timestamp BIGINT NOT NULL, PRIMARY KEY(config_group_id, cluster_id, config_type));
 CREATE TABLE configgroup (group_id BIGINT, cluster_id BIGINT NOT NULL, group_name VARCHAR(255) NOT NULL, tag VARCHAR(1024) NOT NULL, description VARCHAR(1024), create_timestamp BIGINT NOT NULL, PRIMARY KEY(group_id));
 CREATE TABLE configgrouphostmapping (config_group_id BIGINT NOT NULL, host_name VARCHAR(255) NOT NULL, PRIMARY KEY(config_group_id, host_name));
@@ -248,31 +248,31 @@ CREATE INDEX idx_alert_history_state on alert_history(alert_state);
 CREATE INDEX idx_alert_group_name on alert_group(group_name);
 CREATE INDEX idx_alert_notice_state on alert_notice(notify_state);
 
-INSERT INTO ambari_sequences(sequence_name, value) values ('cluster_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('host_role_command_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('user_id_seq', 2);
-INSERT INTO ambari_sequences(sequence_name, value) values ('group_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('member_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('configgroup_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('requestschedule_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('resourcefilter_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('viewentity_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, value) values ('operation_level_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('view_instance_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('resource_type_id_seq', 4);
-INSERT INTO ambari_sequences(sequence_name, value) values ('resource_id_seq', 2);
-INSERT INTO ambari_sequences(sequence_name, value) values ('principal_type_id_seq', 3);
-INSERT INTO ambari_sequences(sequence_name, value) values ('principal_id_seq', 2);
-INSERT INTO ambari_sequences(sequence_name, value) values ('permission_id_seq', 5);
-INSERT INTO ambari_sequences(sequence_name, value) values ('privilege_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('config_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('service_config_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('alert_definition_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, value) values ('alert_group_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, value) values ('alert_target_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, value) values ('alert_history_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, value) values ('alert_notice_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, value) values ('alert_current_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('cluster_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('host_role_command_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('user_id_seq', 2);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('group_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('member_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('configgroup_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('requestschedule_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('resourcefilter_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('viewentity_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('operation_level_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('view_instance_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('resource_type_id_seq', 4);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('resource_id_seq', 2);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('principal_type_id_seq', 3);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('principal_id_seq', 2);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('permission_id_seq', 5);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('privilege_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('config_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('service_config_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('alert_definition_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('alert_group_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('alert_target_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('alert_history_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('alert_notice_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('alert_current_id_seq', 0);
 
 insert into adminresourcetype (resource_type_id, resource_type_name)
   select 1, 'AMBARI'

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
index ccf99af..500313b 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
@@ -46,7 +46,7 @@ CREATE TABLE hostconfigmapping (create_timestamp NUMBER(19) NOT NULL, host_name
 CREATE TABLE metainfo ("metainfo_key" VARCHAR2(255) NOT NULL, "metainfo_value" CLOB NULL, PRIMARY KEY ("metainfo_key"));
 CREATE TABLE ClusterHostMapping (cluster_id NUMBER(19) NOT NULL, host_name VARCHAR2(255) NOT NULL, PRIMARY KEY (cluster_id, host_name));
 CREATE TABLE user_roles (role_name VARCHAR2(255) NOT NULL, user_id NUMBER(10) NOT NULL, PRIMARY KEY (role_name, user_id));
-CREATE TABLE ambari_sequences (sequence_name VARCHAR2(50) NOT NULL, value NUMBER(38) NULL, PRIMARY KEY (sequence_name));
+CREATE TABLE ambari_sequences (sequence_name VARCHAR2(50) NOT NULL, sequence_value NUMBER(38) NULL, PRIMARY KEY (sequence_name));
 CREATE TABLE configgroup (group_id NUMBER(19), cluster_id NUMBER(19) NOT NULL, group_name VARCHAR2(255) NOT NULL, tag VARCHAR2(1024) NOT NULL, description VARCHAR2(1024), create_timestamp NUMBER(19) NOT NULL, PRIMARY KEY(group_id));
 CREATE TABLE confgroupclusterconfigmapping (config_group_id NUMBER(19) NOT NULL, cluster_id NUMBER(19) NOT NULL, config_type VARCHAR2(255) NOT NULL, version_tag VARCHAR2(255) NOT NULL, user_name VARCHAR2(255) DEFAULT '_db', create_timestamp NUMBER(19) NOT NULL, PRIMARY KEY(config_group_id, cluster_id, config_type));
 CREATE TABLE configgrouphostmapping (config_group_id NUMBER(19) NOT NULL, host_name VARCHAR2(255) NOT NULL, PRIMARY KEY(config_group_id, host_name));
@@ -240,31 +240,31 @@ CREATE INDEX idx_alert_group_name on alert_group(group_name);
 CREATE INDEX idx_alert_notice_state on alert_notice(notify_state);
 
 ---------inserting some data-----------
-INSERT INTO ambari_sequences(sequence_name, value) values ('host_role_command_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, value) values ('user_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('group_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, value) values ('member_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, value) values ('cluster_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, value) values ('configgroup_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('requestschedule_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('resourcefilter_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('viewentity_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, value) values ('operation_level_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('view_instance_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('resource_type_id_seq', 4);
-INSERT INTO ambari_sequences(sequence_name, value) values ('resource_id_seq', 2);
-INSERT INTO ambari_sequences(sequence_name, value) values ('principal_type_id_seq', 3);
-INSERT INTO ambari_sequences(sequence_name, value) values ('principal_id_seq', 2);
-INSERT INTO ambari_sequences(sequence_name, value) values ('permission_id_seq', 5);
-INSERT INTO ambari_sequences(sequence_name, value) values ('privilege_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('config_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('service_config_id_seq', 1);
-INSERT INTO ambari_sequences(sequence_name, value) values ('alert_definition_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, value) values ('alert_group_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, value) values ('alert_target_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, value) values ('alert_history_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, value) values ('alert_notice_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, value) values ('alert_current_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('host_role_command_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('user_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('group_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('member_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('cluster_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('configgroup_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('requestschedule_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('resourcefilter_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('viewentity_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('operation_level_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('view_instance_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('resource_type_id_seq', 4);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('resource_id_seq', 2);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('principal_type_id_seq', 3);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('principal_id_seq', 2);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('permission_id_seq', 5);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('privilege_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('config_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('service_config_id_seq', 1);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('alert_definition_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('alert_group_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('alert_target_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('alert_history_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('alert_notice_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('alert_current_id_seq', 0);
 
 INSERT INTO metainfo("metainfo_key", "metainfo_value") values ('version', '${ambariVersion}');
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
index 9178336..a13f415 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
@@ -75,7 +75,7 @@ CREATE TABLE hostconfigmapping (cluster_id BIGINT NOT NULL, host_name VARCHAR(25
 
 CREATE TABLE metainfo ("metainfo_key" VARCHAR(255), "metainfo_value" VARCHAR, PRIMARY KEY ("metainfo_key"));
 
-CREATE TABLE ambari_sequences (sequence_name VARCHAR(255) PRIMARY KEY, "value" BIGINT NOT NULL);
+CREATE TABLE ambari_sequences (sequence_name VARCHAR(255) PRIMARY KEY, sequence_value BIGINT NOT NULL);
 
 CREATE TABLE configgroup (group_id BIGINT, cluster_id BIGINT NOT NULL, group_name VARCHAR(255) NOT NULL, tag VARCHAR(1024) NOT NULL, description VARCHAR(1024), create_timestamp BIGINT NOT NULL, PRIMARY KEY(group_id));
 
@@ -274,7 +274,7 @@ CREATE INDEX idx_alert_notice_state on alert_notice(notify_state);
 
 ---------inserting some data-----------
 BEGIN;
-  INSERT INTO ambari_sequences (sequence_name, "value")
+  INSERT INTO ambari_sequences (sequence_name, sequence_value)
   SELECT 'cluster_id_seq', 1
   UNION ALL
   SELECT 'user_id_seq', 2

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3749ee3/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
index 2dfea87..ff38b24 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
@@ -115,7 +115,7 @@ GRANT ALL PRIVILEGES ON TABLE ambari.hostconfigmapping TO :username;
 CREATE TABLE ambari.metainfo ("metainfo_key" VARCHAR(255), "metainfo_value" VARCHAR, PRIMARY KEY ("metainfo_key"));
 GRANT ALL PRIVILEGES ON TABLE ambari.metainfo TO :username;
 
-CREATE TABLE ambari.ambari_sequences (sequence_name VARCHAR(255) PRIMARY KEY, "value" BIGINT NOT NULL);
+CREATE TABLE ambari.ambari_sequences (sequence_name VARCHAR(255) PRIMARY KEY, sequence_value BIGINT NOT NULL);
 GRANT ALL PRIVILEGES ON TABLE ambari.ambari_sequences TO :username;
 
 CREATE TABLE ambari.configgroup (group_id BIGINT, cluster_id BIGINT NOT NULL, group_name VARCHAR(255) NOT NULL, tag VARCHAR(1024) NOT NULL, description VARCHAR(1024), create_timestamp BIGINT NOT NULL, PRIMARY KEY(group_id));
@@ -348,7 +348,7 @@ CREATE INDEX idx_alert_notice_state on ambari.alert_notice(notify_state);
 
 ---------inserting some data-----------
 BEGIN;
-INSERT INTO ambari.ambari_sequences (sequence_name, "value")
+INSERT INTO ambari.ambari_sequences (sequence_name, sequence_value)
   SELECT 'cluster_id_seq', 1
   UNION ALL
   SELECT 'user_id_seq', 2


Mime
View raw message