sequencescape
sequencescape copied to clipboard
Y24-108 Asset renaming - Barcode model - database changes
Describe the Housekeeping
- Rename the database column
asset_id
on thebarcodes
table tolabware_id
. - Remove the aliases on the model that were added in https://github.com/sanger/sequencescape/issues/4121\
Code references will have already been updated in https://github.com/sanger/sequencescape/issues/4121
Test the database change on training first, and consider running it by the DBAs.
Test the rollback plan as well, as we may get production issues if any code references have been missed.
Write up any learnings as you go, to help with future stories on different models.
Blocking issues
- https://github.com/sanger/sequencescape/issues/4121
Additional context A more complicated but potentially safer approach that could be considered is to do this in several steps:
- Rename the column, remove the aliases, and add in the reverse aliases (feature flagged?). This means any code references that were missed would be less likely to cause issues in this step.
- Feature flag the reverse aliases off. If any production issues popped up in this step, we could just turn the feature flag back on while we fix them.
- Remove the reverse aliases and feature flag once we're confident we've got all the code references.
By 'reverse alias', I mean the following (compare to those suggested here - https://github.com/sanger/sequencescape/issues/4121#issue-2308236994):
alias_attribute :asset_id, :labware_id
alias_attribute :asset, :labware
This story came out of the following research story. This has more detail and results of investigations that could be useful to read:
- https://github.com/sanger/sequencescape/issues/4072