ambari git commit: AMBARI-10569 [WinTP2] Stack widgets creation fails on Windows

2015-04-17 Thread fbarca
Repository: ambari
Updated Branches:
  refs/heads/trunk 4254fb4a1 - 2917d0ded


AMBARI-10569 [WinTP2] Stack widgets creation fails on Windows

Removed the syntax error artifacts. Added the missing tables. Added the missing 
records to the sequence table.


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

Branch: refs/heads/trunk
Commit: 2917d0dede140260ae01ece25a536fb894863e7c
Parents: 4254fb4
Author: Florian Barca fba...@hortonworks.com
Authored: Fri Apr 17 10:31:05 2015 -0700
Committer: Florian Barca fba...@hortonworks.com
Committed: Fri Apr 17 10:31:05 2015 -0700

--
 .../resources/Ambari-DDL-SQLServer-CREATE.sql   | 155 ---
 1 file changed, 98 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2917d0de/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
--
diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 
b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
index 0dc6dc7..835c23f 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
@@ -35,7 +35,7 @@ CREATE TABLE stack(
   stack_id BIGINT NOT NULL,
   stack_name VARCHAR(255) NOT NULL,
   stack_version VARCHAR(255) NOT NULL,
-  PRIMARY KEY (stack_id),
+  PRIMARY KEY CLUSTERED (stack_id),
   CONSTRAINT unq_stack UNIQUE(stack_name,stack_version)
 );
 
@@ -125,7 +125,7 @@ CREATE TABLE cluster_version (
   start_time BIGINT NOT NULL,
   end_time BIGINT,
   user_name VARCHAR(255),
-  PRIMARY KEY (id)
+  PRIMARY KEY CLUSTERED (id)
   );
 
 CREATE TABLE hostcomponentdesiredstate (
@@ -227,14 +227,14 @@ CREATE TABLE groups (
   principal_id BIGINT NOT NULL,
   group_name VARCHAR(255) NOT NULL,
   ldap_group INTEGER NOT NULL DEFAULT 0,
-  PRIMARY KEY (group_id)
+  PRIMARY KEY CLUSTERED (group_id)
   );
 
 CREATE TABLE members (
   member_id INTEGER,
   group_id INTEGER NOT NULL,
   user_id INTEGER NOT NULL,
-  PRIMARY KEY (member_id)
+  PRIMARY KEY CLUSTERED (member_id)
   );
 
 CREATE TABLE execution_command (
@@ -379,7 +379,7 @@ CREATE TABLE configgroup (
   description VARCHAR(1024),
   create_timestamp BIGINT NOT NULL,
   service_name VARCHAR(255),
-  PRIMARY KEY (group_id)
+  PRIMARY KEY CLUSTERED (group_id)
   );
 
 CREATE TABLE confgroupclusterconfigmapping (
@@ -389,7 +389,7 @@ CREATE TABLE confgroupclusterconfigmapping (
   version_tag VARCHAR(255) NOT NULL,
   user_name VARCHAR(255) DEFAULT '_db',
   create_timestamp BIGINT NOT NULL,
-  PRIMARY KEY (
+  PRIMARY KEY CLUSTERED (
 config_group_id,
 cluster_id,
 config_type
@@ -399,7 +399,7 @@ CREATE TABLE confgroupclusterconfigmapping (
 CREATE TABLE configgrouphostmapping (
   config_group_id BIGINT NOT NULL,
   host_name VARCHAR(255) NOT NULL,
-  PRIMARY KEY (
+  PRIMARY KEY CLUSTERED (
 config_group_id,
 host_name
 )
@@ -425,7 +425,7 @@ CREATE TABLE requestschedule (
   startTime VARCHAR(50),
   endTime VARCHAR(50),
   last_execution_status VARCHAR(255),
-  PRIMARY KEY (schedule_id)
+  PRIMARY KEY CLUSTERED (schedule_id)
   );
 
 CREATE TABLE requestschedulebatchrequest (
@@ -438,7 +438,7 @@ CREATE TABLE requestschedulebatchrequest (
   request_status VARCHAR(255),
   return_code SMALLINT,
   return_message TEXT,
-  PRIMARY KEY (
+  PRIMARY KEY CLUSTERED (
 schedule_id,
 batch_id
 )
@@ -447,7 +447,7 @@ CREATE TABLE requestschedulebatchrequest (
 CREATE TABLE blueprint (
   blueprint_name VARCHAR(255) NOT NULL,
   stack_id BIGINT NOT NULL,
-  PRIMARY KEY (blueprint_name),
+  PRIMARY KEY CLUSTERED (blueprint_name),
   FOREIGN KEY (stack_id) REFERENCES stack(stack_id)
   );
 
@@ -455,7 +455,7 @@ CREATE TABLE hostgroup (
   blueprint_name VARCHAR(255) NOT NULL,
   NAME VARCHAR(255) NOT NULL,
   cardinality VARCHAR(255) NOT NULL,
-  PRIMARY KEY (
+  PRIMARY KEY CLUSTERED (
 blueprint_name,
 NAME
 )
@@ -465,7 +465,7 @@ CREATE TABLE hostgroup_component (
   blueprint_name VARCHAR(255) NOT NULL,
   hostgroup_name VARCHAR(255) NOT NULL,
   NAME VARCHAR(255) NOT NULL,
-  PRIMARY KEY (
+  PRIMARY KEY CLUSTERED (
 blueprint_name,
 hostgroup_name,
 NAME
@@ -477,7 +477,7 @@ CREATE TABLE blueprint_configuration (
   type_name VARCHAR(255) NOT NULL,
   config_data TEXT NOT NULL,
   config_attributes VARCHAR(8000),
-  PRIMARY KEY (
+  PRIMARY KEY CLUSTERED (
 blueprint_name,
 type_name
 )
@@ -489,7 +489,7 @@ CREATE TABLE hostgroup_configuration (
   type_name VARCHAR(255) NOT NULL,
   config_data TEXT NOT NULL,
   config_attributes TEXT,

ambari git commit: AMBARI-10569 [WinTP2] Stack widgets creation fails on Windows

2015-04-17 Thread fbarca
Repository: ambari
Updated Branches:
  refs/heads/trunk 7f542913b - b392c6861


AMBARI-10569 [WinTP2] Stack widgets creation fails on Windows

Updating the drop tables script too


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

Branch: refs/heads/trunk
Commit: b392c686171dcfdcc59a6813df1f137149c7107a
Parents: 7f54291
Author: Florian Barca fba...@hortonworks.com
Authored: Fri Apr 17 13:55:11 2015 -0700
Committer: Florian Barca fba...@hortonworks.com
Committed: Fri Apr 17 13:55:11 2015 -0700

--
 .../src/main/resources/Ambari-DDL-SQLServer-DROP.sql | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b392c686/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql
--
diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql 
b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql
index 06dca95..8cb3132 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql
@@ -211,7 +211,13 @@ IF OBJECT_ID('adminprincipaltype', 'U') IS NOT NULL DROP 
TABLE adminprincipaltyp
 GO
 IF OBJECT_ID('repo_version', 'U') IS NOT NULL DROP TABLE repo_version
 GO
+IF OBJECT_ID('widget_layout_user_widget', 'U') IS NOT NULL DROP TABLE 
widget_layout_user_widget
+GO
+IF OBJECT_ID('widget_layout', 'U') IS NOT NULL DROP TABLE widget_layout
+GO
+IF OBJECT_ID('widget', 'U') IS NOT NULL DROP TABLE widget
+GO
 IF OBJECT_ID('artifact', 'U') IS NOT NULL DROP TABLE artifact
 GO
 IF OBJECT_ID('stack', 'U') IS NOT NULL DROP TABLE stack
-GO
\ No newline at end of file
+GO