-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to use duplicated entity when creating notice
We have noticed that there are some duplicate entities resulting from importing data from various sources. While we do plan to merge them eventually, we still need to allow their use in creating new notices for the time being. While this situation is less than ideal, we can put the constraint back once we no longer have duplicate entities. Alternatively, we could consolidate all existing entities into the notices table and store them as jsonb.
- Loading branch information
1 parent
605ed9d
commit 8c2e518
Showing
5 changed files
with
59 additions
and
5 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
5 changes: 5 additions & 0 deletions
5
db/migrate/20230310092957_remove_unique_name_constraint_from_entities.rb
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class RemoveUniqueNameConstraintFromEntities < ActiveRecord::Migration[6.1] | ||
def change | ||
remove_index :entities, ['name', 'address_line_1', 'city', 'state', 'zip', 'country_code', 'phone', 'email'] | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -402,6 +402,6 @@ def mock_assessment(notice, high_risk) | |
|
||
expect(notice).not_to be_on_behalf_of_principal | ||
end | ||
end | ||
end | ||
end | ||
end |
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