-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): handle previous deleted attributes when creating a new one
- Loading branch information
Showing
2 changed files
with
16 additions
and
2 deletions.
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
12 changes: 10 additions & 2 deletions
12
search-service/src/main/resources/db/migration/V0_44__add_deleted_at_temporal_property.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,5 +1,13 @@ | ||
ALTER TABLE temporal_entity_attribute | ||
ADD COLUMN deleted_at timestamp with time zone; | ||
ADD COLUMN deleted_at timestamp with time zone; | ||
|
||
ALTER TABLE entity_payload | ||
ADD COLUMN deleted_at timestamp with time zone; | ||
ADD COLUMN deleted_at timestamp with time zone; | ||
|
||
DROP INDEX IF EXISTS temporal_entity_attribute_null_datasetid_uniqueness; | ||
|
||
ALTER TABLE temporal_entity_attribute | ||
DROP CONSTRAINT temporal_entity_attribute_uniqueness; | ||
|
||
ALTER TABLE temporal_entity_attribute | ||
ADD CONSTRAINT temporal_entity_attribute_uniqueness UNIQUE NULLS NOT DISTINCT (entity_id, attribute_name, dataset_id); |