-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(migrate): migrate history uniqueIdentifier in collaboration_proj…
…ect (#2377) * migrate history uniqueIdentifier in collaboration_project * modify unique key name * fix ut test * response to reveiw
- Loading branch information
1 parent
6a0eaea
commit b7605ac
Showing
5 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
4 changes: 3 additions & 1 deletion
4
server/odc-migrate/src/main/resources/migrate/common/V_4_3_0_4__add_unique_identifier.sql
This file contains 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 |
---|---|---|
@@ -1 +1,3 @@ | ||
ALTER TABLE `collaboration_project` ADD COLUMN `unique_identifier` VARCHAR(128) DEFAULT NULL COMMENT 'Unique identifier, from external system'; | ||
ALTER TABLE `collaboration_project` ADD COLUMN `unique_identifier` VARCHAR(128) DEFAULT NULL COMMENT 'Unique identifier, may from external system or UUID generated by ODC if no external identifier'; | ||
UPDATE `collaboration_project` set `unique_identifier`=concat('ODC_', uuid()) where unique_identifier IS NULL; | ||
ALTER TABLE `collaboration_project` ADD UNIQUE KEY `uk_collaboration_project_unique_identifier` (`unique_identifier`); |
This file contains 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 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 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