-
Notifications
You must be signed in to change notification settings - Fork 43
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
[AAE-15727] add and modify columns for name in project table #1178
base: develop
Are you sure you want to change the base?
Changes from all commits
897e575
d39d040
4b1b879
073ddc5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,8 +34,11 @@ public class ProjectImpl extends AbstractAuditable<String> implements Project<St | |
@Schema(description = "The unique identifier of the project", readOnly = true) | ||
private String id; | ||
|
||
@Schema(description = "The name of the project") | ||
private String name; | ||
@Schema(description = "The technical name of the project") | ||
private String technicalName; | ||
|
||
@Schema(description = "The display name of the project") | ||
private String displayName; | ||
|
||
@Schema(description = "The description of the project") | ||
private String description; | ||
|
@@ -47,7 +50,7 @@ public ProjectImpl() {} | |
|
||
public ProjectImpl(String id, String name) { | ||
this.id = id; | ||
this.name = name; | ||
setName(name); | ||
} | ||
|
||
@Override | ||
|
@@ -62,12 +65,35 @@ public void setId(String id) { | |
|
||
@Override | ||
public String getName() { | ||
return name; | ||
return getTechnicalName(); | ||
} | ||
|
||
@Override | ||
public void setName(String name) { | ||
this.name = name; | ||
setTechnicalName(name); | ||
|
||
//TODO: Modify temporary code that sets display name same as technical name | ||
setDisplayName(name); | ||
} | ||
Comment on lines
72
to
+77
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. I will leave just a comment since I will be off after today and I don't want to block the PR. |
||
|
||
@Override | ||
public String getTechnicalName() { | ||
return technicalName; | ||
} | ||
|
||
@Override | ||
public void setTechnicalName(String technicalName) { | ||
this.technicalName = technicalName; | ||
} | ||
|
||
@Override | ||
public String getDisplayName() { | ||
return displayName; | ||
} | ||
|
||
@Override | ||
public void setDisplayName(String name) { | ||
this.displayName = name; | ||
} | ||
|
||
@Override | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright 2017-2020 Alfresco Software, Ltd. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
ALTER TABLE project | ||
ADD COLUMN disp_name varchar(255); | ||
|
||
UPDATE project p | ||
SET disp_name = p.name; | ||
|
||
ALTER TABLE project | ||
ALTER COLUMN disp_name SET NOT NULL; | ||
|
||
ALTER TABLE project | ||
RENAME COLUMN name TO tech_name; | ||
|
||
ALTER TABLE project | ||
ALTER COLUMN tech_name SET NOT NULL; |
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.
The step to renaming the getTechnicalName that is not the final name yet should be done in the end Why it's already here?