Closed neilsycamore closed 9 months ago
~Hi @neilsycamore @stevieing, the following SQL statement can be used to update the corresponding comment in the table:~
ALTER TABLE <database>.iseq_flowcell MODIFY COLUMN entity_type varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'Lane type: library, library_control, library_indexed, library_indexed_spike';
~I've already executed this in the database mlwhd_mlwarehouse_devdata
. Shall I execute it for mlwhd_mlwarehouse
as well?~
Edit: This required generating additional migrations for unified_warehouse
. I've added a new migration in https://github.com/sanger/unified_warehouse/pull/597.
Deployment procedure:
iseq_flowcell
table’s entity_type
attribute’s comment and verify that it has got a “pool” keyword.entity_type
column comment of the iseq_flowcell
table.Deployment Results
TASK [rails_app : Run migrations] ***************************************************************************************************************
changed: [ware-prod.psd.sanger.ac.uk] => {
"changed": true,
"cmd": "bundle exec rake db:migrate",
"delta": "0:00:04.280111",
"end": "2024-03-04 16:07:14.839290",
"rc": 0,
"start": "2024-03-04 16:07:10.559179"
}
STDOUT:
== 20240228140011 UpdateIseqFlowcellEntityTypeComment: migrating ==============
-- change_column_comment(:iseq_flowcell, :entity_type, "Lane type: library, library_control, library_indexed, library_indexed_spike")
-> 0.8000s
== 20240228140011 UpdateIseqFlowcellEntityTypeComment: migrated (0.8001s) =====
As a member of NPG (Marina G) I would like the comment for the entity_type column updated by removing the reference to "pool". The semantics of the iseq_flowcell table does not allow for pool records.
Who are the primary contacts for this story Marina G, Keith J
References Raised in RT795182
mysql> show create table iseq_flowcell;
| iseq_flowcell | CREATE TABLE
iseq_flowcell
( ...entity_type
varchar(30) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Lane type: library, pool, library_control, library_indexed, library_indexed_spike', ... ) ENGINE=InnoDB AUTO_INCREMENT=12366252 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci |mysql> select distinct entity_type from iseq_flowcell;; +-----------------------+ | entity_type | +-----------------------+ | library | | library_control | | library_indexed | | library_indexed_spike | +-----------------------+