Skip to content

Commit

Permalink
Merge pull request #152 from wtsi-npg/devel
Browse files Browse the repository at this point in the history
merge from devel to master for release 6.10.0
  • Loading branch information
mgcam authored Jul 20, 2020
2 parents 321722a + c5b1278 commit 5a3f11e
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 29 deletions.
8 changes: 8 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
LIST OF CHANGES
---------------

release 6.10.0
- add id_run column to the iseq_heron_product_metrics table
- to allow for deletion of iseq_product_metrica rows, drop
the foreign key constraint on the id_iseq_product column in
the iseq_heron_product_metrics table, keep the relation
definition in the DBIx class
- update the DBIx class for the cgap_heron table

release 6.9.0
- ml warehouse LIMS drivers - define additional delegated
to sample objects methods
Expand Down
19 changes: 17 additions & 2 deletions lib/WTSI/DNAP/Warehouse/Schema/Result/CgapHeron.pm
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,17 @@ Internal to this database id. Value can change.
is_nullable: 0
size: 32
=head2 lysis_buffer
data_type: 'varchar'
is_nullable: 1
size: 64
=head2 priority
data_type: 'tinyint'
is_nullable: 1
=cut

__PACKAGE__->add_columns(
Expand Down Expand Up @@ -147,6 +158,10 @@ __PACKAGE__->add_columns(
},
'sample_state',
{ data_type => 'varchar', is_nullable => 0, size => 32 },
'lysis_buffer',
{ data_type => 'varchar', is_nullable => 1, size => 64 },
'priority',
{ data_type => 'tinyint', is_nullable => 1 },
);

=head1 PRIMARY KEY
Expand Down Expand Up @@ -193,8 +208,8 @@ __PACKAGE__->add_unique_constraint(
__PACKAGE__->add_unique_constraint('tube_barcode', ['tube_barcode']);


# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-06-11 17:00:43
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:w4fgEfecKEbXiTnwlD55lA
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-07-16 16:20:22
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:A6iXAAlelMAfco73oMW1Bw

our $VERSION = '0';

Expand Down
29 changes: 19 additions & 10 deletions lib/WTSI/DNAP/Warehouse/Schema/Result/IseqHeronProductMetric.pm
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,17 @@ Datetime this record was created
Datetime this record was created or changed
=head2 id_run
data_type: 'integer'
extra: {unsigned => 1}
is_nullable: 1
Run id
=head2 id_iseq_product
data_type: 'char'
is_foreign_key: 1
is_nullable: 0
size: 64
Expand Down Expand Up @@ -168,8 +175,10 @@ __PACKAGE__->add_columns(
default_value => 'CURRENT_TIMESTAMP',
is_nullable => 1,
},
'id_run',
{ data_type => 'integer', extra => { unsigned => 1 }, is_nullable => 1 },
'id_iseq_product',
{ data_type => 'char', is_foreign_key => 1, is_nullable => 0, size => 64 },
{ data_type => 'char', is_nullable => 0, size => 64 },
'supplier_sample_name',
{ data_type => 'varchar', is_nullable => 1, size => 255 },
'artic_qc_outcome',
Expand Down Expand Up @@ -220,9 +229,15 @@ __PACKAGE__->set_primary_key('id_iseq_hrpr_metrics_tmp');

__PACKAGE__->add_unique_constraint('iseq_hrm_digest_unq', ['id_iseq_product']);


# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-07-16 16:20:22
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BCr7sE1ypWdilE/PkyuRQg

our $VERSION = '0';

=head1 RELATIONS
=head2 iseq_product
=head2 iseq_product_metric
Type: belongs_to
Expand All @@ -231,18 +246,12 @@ Related object: L<WTSI::DNAP::Warehouse::Schema::Result::IseqProductMetric>
=cut

__PACKAGE__->belongs_to(
'iseq_product',
'iseq_product_metric',
'WTSI::DNAP::Warehouse::Schema::Result::IseqProductMetric',
{ id_iseq_product => 'id_iseq_product' },
{ is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' },
);


# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-06-12 13:02:59
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:91MLDFF3YTvYM61798/5Ng

our $VERSION = '0';

__PACKAGE__->meta->make_immutable;
1;

Expand Down
36 changes: 19 additions & 17 deletions lib/WTSI/DNAP/Warehouse/Schema/Result/IseqProductMetric.pm
Original file line number Diff line number Diff line change
Expand Up @@ -885,21 +885,6 @@ __PACKAGE__->belongs_to(
},
);

=head2 iseq_heron_product_metric
Type: might_have
Related object: L<WTSI::DNAP::Warehouse::Schema::Result::IseqHeronProductMetric>
=cut

__PACKAGE__->might_have(
'iseq_heron_product_metric',
'WTSI::DNAP::Warehouse::Schema::Result::IseqHeronProductMetric',
{ 'foreign.id_iseq_product' => 'self.id_iseq_product' },
{ cascade_copy => 0, cascade_delete => 0 },
);

=head2 iseq_product_components
Type: has_many
Expand Down Expand Up @@ -953,14 +938,16 @@ __PACKAGE__->belongs_to(
);


# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-06-11 17:00:44
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WmrUdOLNhyMKAhrgNZCLzw
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-07-16 16:20:22
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7bfqP9vnlQ7g6s17gXNkrA


# You can replace this text with custom code or comments, and it will be preserved on regeneration

our $VERSION = '0';

=head1 RELATIONS
=head2 iseq_run_lane_metric_right
Type: belongs_to
Expand Down Expand Up @@ -1011,6 +998,21 @@ __PACKAGE__->has_many(
{ is_deferrable => 1, cascade_copy => 0, cascade_delete => 0 },
);

=head2 iseq_heron_product_metric
Type: might_have
Related object: L<WTSI::DNAP::Warehouse::Schema::Result::IseqHeronProductMetric>
=cut

__PACKAGE__->might_have(
'iseq_heron_product_metric',
'WTSI::DNAP::Warehouse::Schema::Result::IseqHeronProductMetric',
{ 'foreign.id_iseq_product' => 'self.id_iseq_product' },
{ cascade_copy => 0, cascade_delete => 0 },
);

##no critic (ProhibitStringyEval ProhibitPostfixControls ProhibitInterpolationOfLiterals)
with 'npg_qc::autoqc::role::rpt_key' if eval "require npg_qc::autoqc::role::rpt_key";
##use critic
Expand Down
4 changes: 4 additions & 0 deletions scripts/update_schema_6.10.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ALTER TABLE `iseq_heron_product_metrics` \
ADD COLUMN `id_run` INT(10) UNSIGNED DEFAULT NULL COMMENT 'Run id' AFTER `last_changed`, \
DROP FOREIGN KEY `iseq_hrm_prm_fk`;

0 comments on commit 5a3f11e

Please sign in to comment.