-
Notifications
You must be signed in to change notification settings - Fork 1.7k
AMBARI-22776 Fix DDL issues resulting from incomplete table rename (benyoka) #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
benyoka
merged 2 commits into
apache:branch-feature-AMBARI-14714
from
benyoka:AMBARI-22776-branch-feature-AMBARI-14714
Jan 25, 2018
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -85,17 +85,6 @@ CREATE TABLE clusters ( | |||
| CONSTRAINT FK_clusters_desired_stack_id FOREIGN KEY (desired_stack_id) REFERENCES stack(stack_id), | ||||
| CONSTRAINT FK_clusters_resource_id FOREIGN KEY (resource_id) REFERENCES adminresource(resource_id)); | ||||
|
|
||||
| CREATE TABLE configuration_base ( | ||||
| id BIGINT NOT NULL, | ||||
| version_tag VARCHAR(255) NOT NULL, | ||||
| version BIGINT NOT NULL, | ||||
| type VARCHAR(255) NOT NULL, | ||||
| data VARCHAR(3000) NOT NULL, | ||||
| attributes VARCHAR(3000), | ||||
| create_timestamp BIGINT NOT NULL, | ||||
| CONSTRAINT PK_configuration_base PRIMARY KEY (id) | ||||
| ); | ||||
|
|
||||
| CREATE TABLE ambari_configuration ( | ||||
| category_name VARCHAR(100) NOT NULL, | ||||
| property_name VARCHAR(100) NOT NULL, | ||||
|
|
@@ -145,8 +134,8 @@ CREATE TABLE servicegroupdependencies ( | |||
| dependent_service_group_cluster_id BIGINT NOT NULL, | ||||
| CONSTRAINT PK_servicegroupdependencies PRIMARY KEY (id), | ||||
| CONSTRAINT UQ_servicegroupdependencies UNIQUE (service_group_id, service_group_cluster_id, dependent_service_group_id, dependent_service_group_cluster_id), | ||||
| CONSTRAINT FK_servicegroupdependencies_service_group_cluster_id FOREIGN KEY (service_group_id, service_group_cluster_id) REFERENCES servicegroups (id, cluster_id), | ||||
| CONSTRAINT FK_servicegroupdependencies_dependent_service_group_cluster_id FOREIGN KEY (dependent_service_group_id, dependent_service_group_cluster_id) REFERENCES servicegroups (id, cluster_id)); | ||||
| CONSTRAINT FK_svcgrpdep_svcgrp_cl_id FOREIGN KEY (service_group_id, service_group_cluster_id) REFERENCES servicegroups (id, cluster_id), | ||||
| CONSTRAINT FK_svcgrpdep_dep_svcgrp_cl_id FOREIGN KEY (dependent_service_group_id, dependent_service_group_cluster_id) REFERENCES servicegroups (id, cluster_id)); | ||||
|
|
||||
| CREATE TABLE clusterservices ( | ||||
| id BIGINT NOT NULL, | ||||
|
|
@@ -191,8 +180,8 @@ CREATE TABLE servicedependencies ( | |||
| dependent_service_cluster_id BIGINT NOT NULL, | ||||
| CONSTRAINT PK_servicedependencies PRIMARY KEY (id), | ||||
| CONSTRAINT UQ_servicedependencies UNIQUE (service_id, service_group_id, service_cluster_id, dependent_service_id, dependent_service_group_id, dependent_service_cluster_id), | ||||
| CONSTRAINT FK_servicedependencies_service_group_cluster_id FOREIGN KEY (service_id, service_group_id, service_cluster_id) REFERENCES clusterservices (id, service_group_id, cluster_id), | ||||
| CONSTRAINT FK_servicedependencies_dependent_service_group_cluster_id FOREIGN KEY (dependent_service_id, dependent_service_group_id, dependent_service_cluster_id) REFERENCES clusterservices (id, service_group_id, cluster_id)); | ||||
| CONSTRAINT FK_svcdep_svc_grp_clstr_id FOREIGN KEY (service_id, service_group_id, service_cluster_id) REFERENCES clusterservices (id, service_group_id, cluster_id), | ||||
| CONSTRAINT FK_svcdep_dep_scv_grp_clstr_id FOREIGN KEY (dependent_service_id, dependent_service_group_id, dependent_service_cluster_id) REFERENCES clusterservices (id, service_group_id, cluster_id)); | ||||
|
|
||||
| CREATE TABLE serviceconfig ( | ||||
| service_config_id BIGINT NOT NULL, | ||||
|
|
@@ -207,7 +196,7 @@ CREATE TABLE serviceconfig ( | |||
| note VARCHAR(3000), | ||||
| CONSTRAINT PK_serviceconfig PRIMARY KEY (service_config_id), | ||||
| CONSTRAINT FK_serviceconfig_stack_id FOREIGN KEY (stack_id) REFERENCES stack(stack_id), | ||||
| CONSTRAINT FK_serviceconfig_cluster_service FOREIGN KEY (service_id, service_group_id, cluster_id) REFERENCES clusterservices (id, service_group_id, cluster_id), | ||||
| CONSTRAINT FK_serviceconfig_clstr_svc FOREIGN KEY (service_id, service_group_id, cluster_id) REFERENCES clusterservices (id, service_group_id, cluster_id), | ||||
| CONSTRAINT UQ_scv_service_version UNIQUE (cluster_id, service_id, version)); | ||||
|
|
||||
| CREATE TABLE serviceconfighosts ( | ||||
|
|
@@ -535,8 +524,8 @@ CREATE TABLE hostconfigmapping ( | |||
| selected INTEGER NOT NULL DEFAULT 0, | ||||
| user_name VARCHAR(255) NOT NULL DEFAULT '_db', | ||||
| CONSTRAINT PK_hostconfigmapping PRIMARY KEY (cluster_id, host_id, type_name, create_timestamp), | ||||
| CONSTRAINT FK_hostconfmapping_cluster_id FOREIGN KEY (cluster_id) REFERENCES clusters (cluster_id), | ||||
| CONSTRAINT FK_hostconfmapping_cluster_service FOREIGN KEY (service_id, service_group_id, cluster_id) REFERENCES clusterservices (id, service_group_id, cluster_id), | ||||
| CONSTRAINT FK_hostconfmapping_clstr_id FOREIGN KEY (cluster_id) REFERENCES clusters (cluster_id), | ||||
| CONSTRAINT FK_hostconfmapping_clstr_svc FOREIGN KEY (service_id, service_group_id, cluster_id) REFERENCES clusterservices (id, service_group_id, cluster_id), | ||||
| CONSTRAINT FK_hostconfmapping_host_id FOREIGN KEY (host_id) REFERENCES hosts (host_id)); | ||||
|
|
||||
| CREATE TABLE metainfo ( | ||||
|
|
@@ -613,11 +602,11 @@ CREATE TABLE blueprint_mpack_instance( | |||
|
|
||||
| CREATE TABLE blueprint_service ( | ||||
| id BIGINT NOT NULL, | ||||
| mpack_ref_id BIGINT NOT NULL, | ||||
| mpack_instance_id BIGINT NOT NULL, | ||||
| name VARCHAR(255) NOT NULL, | ||||
| type VARCHAR(255) NOT NULL, | ||||
| CONSTRAINT PK_blueprint_service PRIMARY KEY (id), | ||||
| CONSTRAINT FK_blueprint_service_mpack_ref FOREIGN KEY (mpack_ref_id) REFERENCES blueprint_mpack_reference(id)); | ||||
| CONSTRAINT FK_blueprint_svc_mpack_inst FOREIGN KEY (mpack_instance_id) REFERENCES blueprint_mpack_instance(id)); | ||||
|
|
||||
| CREATE TABLE blueprint_service_config ( | ||||
| service_id BIGINT NOT NULL, | ||||
|
|
@@ -628,12 +617,12 @@ CREATE TABLE blueprint_service_config ( | |||
| CONSTRAINT FK_bp_svc_config_to_service FOREIGN KEY (service_id) REFERENCES blueprint_service (id)); | ||||
|
|
||||
| CREATE TABLE blueprint_mpack_configuration ( | ||||
| mpack_ref_id BIGINT NOT NULL, | ||||
| mpack_instance_id BIGINT NOT NULL, | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't this require a change in Line 41 in 80d840e
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. Thanks. |
||||
| type_name VARCHAR(255) NOT NULL, | ||||
| config_data VARCHAR(3000) NOT NULL, | ||||
| config_attributes VARCHAR(3000), | ||||
| CONSTRAINT PK_bp_mpack_conf PRIMARY KEY (mpack_ref_id, type_name), | ||||
| CONSTRAINT FK_bp_mpack_config_to_mpack FOREIGN KEY (mpack_ref_id) REFERENCES blueprint_mpack_reference (id)); | ||||
| CONSTRAINT PK_bp_mpack_conf PRIMARY KEY (mpack_instance_id, type_name), | ||||
| CONSTRAINT FK_bp_mpack_config_to_mpack FOREIGN KEY (mpack_instance_id) REFERENCES blueprint_mpack_instance(id)); | ||||
|
|
||||
| CREATE TABLE hostgroup ( | ||||
| blueprint_name VARCHAR(255) NOT NULL, | ||||
|
|
||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this require a change in
BlueprintServiceEntity, too?ambari/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/BlueprintServiceEntity.java
Line 50 in 80d840e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Thanks.