-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4393 from sanger/develop
Develop into master
- Loading branch information
Showing
14 changed files
with
625 additions
and
78 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
14.43.1 | ||
14.43.2 |
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
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
26 changes: 26 additions & 0 deletions
26
db/migrate/20240912000109_add_unique_index_to_asset_links.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,26 @@ | ||
# frozen_string_literal: true | ||
|
||
# This migration adds a unique-together index on ancestor_id and descendant_id | ||
# in order to prevent duplicate links between the same ancestor and descendant | ||
# labware. | ||
# | ||
# Before this migration, the database allowed duplicate asset_links between the | ||
# same ancestor and descendant labware. Therefore, the migration will fail if | ||
# there are any duplicate links in the database. To fix this, they must be | ||
# removed before running the migration using the rake task: | ||
# | ||
# bundle exec rake 'support:remove_duplicate_asset_links[csv_file_path]' | ||
# | ||
# The rake task will write the removed records into a CSV file that can be used | ||
# for auditing purposes. | ||
# | ||
# Note that the column names in the index name below is used for finding the | ||
# reason of the database unique constraint violation by the AssetLink model. | ||
class AddUniqueIndexToAssetLinks < ActiveRecord::Migration[6.1] | ||
def change | ||
add_index :asset_links, | ||
%i[ancestor_id descendant_id], | ||
unique: true, | ||
name: 'index_asset_links_on_ancestor_id_and_descendant_id' | ||
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
Oops, something went wrong.