Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added last_changed column to PacBio metrics tables #222

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
LIST OF CHANGES
---------------

release 6.30.0
- To help with detecting recent changes, add `last_changed` column
to PacBio NPG tables and update relevant DBIx classes.
- Updated DBIx classes from the prod database schema. Two types of changes:
1. due to a aserver upgrade tp MySQL v.8+
2. due to database schema changes.

release 6.29.1
- Switch to Perlbrew to obtain multiple Perl versions

Expand Down
8 changes: 4 additions & 4 deletions lib/WTSI/DNAP/Warehouse/Schema/Result/FlgenPlate.pm
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ __PACKAGE__->belongs_to(
'sample',
'WTSI::DNAP::Warehouse::Schema::Result::Sample',
{ id_sample_tmp => 'id_sample_tmp' },
{ is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' },
{ is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' },
);

=head2 study
Expand All @@ -267,12 +267,12 @@ __PACKAGE__->belongs_to(
'study',
'WTSI::DNAP::Warehouse::Schema::Result::Study',
{ id_study_tmp => 'id_study_tmp' },
{ is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' },
{ is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' },
);


# Created by DBIx::Class::Schema::Loader v0.07036 @ 2015-01-19 16:35:18
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Df/CLIOB+DW9/6zUgYLM6A
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 16:35:44
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lD09a55ctFBQGOiCkQis4Q

our $VERSION = '0';

Expand Down
40 changes: 30 additions & 10 deletions lib/WTSI/DNAP/Warehouse/Schema/Result/GsuSampleUpload.pm
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Location of data file
data_type: 'integer'
extra: {unsigned => 1}
is_foreign_key: 1
is_nullable: 0
is_nullable: 1

Study for this item

Expand All @@ -87,14 +87,14 @@ Study for this item
data_type: 'integer'
extra: {unsigned => 1}
is_foreign_key: 1
is_nullable: 0
is_nullable: 1

Sample info for this item

=head2 library_name

data_type: 'varchar'
is_nullable: 0
is_nullable: 1
size: 40

Supplier library name
Expand Down Expand Up @@ -131,6 +131,14 @@ Lab supplying the data

ENA run accession, populated on ENA submission

=head2 ena_upload

data_type: 'tinyint'
default_value: 0
is_nullable: 0

Identifies if the sample is eligible for ENA upload

=cut

__PACKAGE__->add_columns(
Expand Down Expand Up @@ -162,17 +170,17 @@ __PACKAGE__->add_columns(
data_type => 'integer',
extra => { unsigned => 1 },
is_foreign_key => 1,
is_nullable => 0,
is_nullable => 1,
},
'id_sample_tmp',
{
data_type => 'integer',
extra => { unsigned => 1 },
is_foreign_key => 1,
is_nullable => 0,
is_nullable => 1,
},
'library_name',
{ data_type => 'varchar', is_nullable => 0, size => 40 },
{ data_type => 'varchar', is_nullable => 1, size => 40 },
'library_type',
{ data_type => 'varchar', is_nullable => 0, size => 40 },
'instrument_model',
Expand All @@ -181,6 +189,8 @@ __PACKAGE__->add_columns(
{ data_type => 'varchar', is_nullable => 0, size => 100 },
'run_accession',
{ data_type => 'varchar', is_nullable => 1, size => 40 },
'ena_upload',
{ data_type => 'tinyint', default_value => 0, is_nullable => 0 },
);

=head1 PRIMARY KEY
Expand Down Expand Up @@ -235,7 +245,12 @@ __PACKAGE__->belongs_to(
'sample',
'WTSI::DNAP::Warehouse::Schema::Result::Sample',
{ id_sample_tmp => 'id_sample_tmp' },
{ is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' },
{
is_deferrable => 1,
join_type => 'LEFT',
on_delete => 'RESTRICT',
on_update => 'RESTRICT',
},
);

=head2 study
Expand All @@ -250,12 +265,17 @@ __PACKAGE__->belongs_to(
'study',
'WTSI::DNAP::Warehouse::Schema::Result::Study',
{ id_study_tmp => 'id_study_tmp' },
{ is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' },
{
is_deferrable => 1,
join_type => 'LEFT',
on_delete => 'RESTRICT',
on_update => 'RESTRICT',
},
);


# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-02-09 15:29:50
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ooVmo3tgjndSeKcqD6ynHw
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 16:35:44
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kLSRN187cu2gr+3cdSypqw


# You can replace this text with custom code or comments, and it will be preserved on regeneration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ __PACKAGE__->belongs_to(
'iseq_product_ext',
'WTSI::DNAP::Warehouse::Schema::Result::IseqExternalProductMetric',
{ id_iseq_product => 'id_iseq_product_ext' },
{ is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' },
{ is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' },
);


# Created by DBIx::Class::Schema::Loader v0.07049 @ 2019-10-18 16:31:06
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MZF9h1iwW2028nqp+S3KRA
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 16:35:44
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6qZDsJfhvxqvyeZkvdBsnw

our $VERSION = '0';

Expand Down
10 changes: 5 additions & 5 deletions lib/WTSI/DNAP/Warehouse/Schema/Result/IseqFlowcell.pm
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ __PACKAGE__->belongs_to(
'sample',
'WTSI::DNAP::Warehouse::Schema::Result::Sample',
{ id_sample_tmp => 'id_sample_tmp' },
{ is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' },
{ is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' },
);

=head2 study
Expand All @@ -581,14 +581,14 @@ __PACKAGE__->belongs_to(
{
is_deferrable => 1,
join_type => 'LEFT',
on_delete => 'NO ACTION',
on_update => 'NO ACTION',
on_delete => 'RESTRICT',
on_update => 'RESTRICT',
},
);


# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-05-16 15:36:45
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WKXNoBer1TGZJNTUsLE3TA
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 16:35:44
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VjDSKdvECkCYaV1Nypjnzw

use MooseX::Aliases;
use Readonly;
Expand Down
7 changes: 3 additions & 4 deletions lib/WTSI/DNAP/Warehouse/Schema/Result/IseqHeronClimbStatus.pm
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ __PACKAGE__->table('iseq_heron_climb_status');
=head2 anonymous_sample_id

data_type: 'varchar'
default_value: (empty string)
is_nullable: 1
size: 15

Expand Down Expand Up @@ -130,7 +129,7 @@ __PACKAGE__->add_columns(
is_nullable => 0,
},
'anonymous_sample_id',
{ data_type => 'varchar', default_value => '', is_nullable => 1, size => 15 },
{ data_type => 'varchar', is_nullable => 1, size => 15 },
);

=head1 PRIMARY KEY
Expand All @@ -146,8 +145,8 @@ __PACKAGE__->add_columns(
__PACKAGE__->set_primary_key('id');


# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-07-21 23:04:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jToP8sVQEQTYrsDJMuxwrw
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 16:35:44
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3XOtKycEV9IycXJtXeepZQ


# You can replace this text with custom code or comments, and it will be preserved on regeneration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,12 @@ __PACKAGE__->belongs_to(
'iseq_product',
'WTSI::DNAP::Warehouse::Schema::Result::IseqProductMetric',
{ id_iseq_product => 'id_iseq_product' },
{ is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' },
{ is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' },
);


# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-09-29 13:29:47
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BU6yKQbGElrb3nXbK9ZqIA
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 16:35:44
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:U1ZHxtXu3hCdlMfUM81Hsg

our $VERSION = '0';

Expand Down
8 changes: 4 additions & 4 deletions lib/WTSI/DNAP/Warehouse/Schema/Result/IseqProductComponent.pm
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ __PACKAGE__->belongs_to(
'iseq_product',
'WTSI::DNAP::Warehouse::Schema::Result::IseqProductMetric',
{ id_iseq_pr_metrics_tmp => 'id_iseq_pr_tmp' },
{ is_deferrable => 1, on_delete => 'CASCADE', on_update => 'NO ACTION' },
{ is_deferrable => 1, on_delete => 'CASCADE', on_update => 'RESTRICT' },
);

=head2 iseq_product_component
Expand All @@ -172,12 +172,12 @@ __PACKAGE__->belongs_to(
'iseq_product_component',
'WTSI::DNAP::Warehouse::Schema::Result::IseqProductMetric',
{ id_iseq_pr_metrics_tmp => 'id_iseq_pr_component_tmp' },
{ is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' },
{ is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' },
);


# Created by DBIx::Class::Schema::Loader v0.07049 @ 2019-02-22 16:03:28
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wsP1sEBK1oRYk5C8X4RRag
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 16:35:44
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:S3T1/dAm6L5h7cAAumcITw


# You can replace this text with custom code or comments, and it will be preserved on regeneration
Expand Down
8 changes: 4 additions & 4 deletions lib/WTSI/DNAP/Warehouse/Schema/Result/IseqProductMetric.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ __PACKAGE__->belongs_to(
is_deferrable => 1,
join_type => 'LEFT',
on_delete => 'SET NULL',
on_update => 'NO ACTION',
on_update => 'RESTRICT',
},
);

Expand Down Expand Up @@ -1068,13 +1068,13 @@ __PACKAGE__->belongs_to(
is_deferrable => 1,
join_type => 'LEFT',
on_delete => 'CASCADE',
on_update => 'NO ACTION',
on_update => 'RESTRICT',
},
);


# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-06-30 16:24:05
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:h1WsGh1UGAW4XYqkn1085Q
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 16:35:44
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Rf7TGwVeXRjNW5a9wU8baQ


# You can replace this text with custom code or comments, and it will be preserved on regeneration
Expand Down
6 changes: 3 additions & 3 deletions lib/WTSI/DNAP/Warehouse/Schema/Result/IseqRunInfo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ __PACKAGE__->belongs_to(
'run',
'WTSI::DNAP::Warehouse::Schema::Result::IseqRun',
{ id_run => 'id_run' },
{ is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' },
{ is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' },
);


# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-04-01 17:33:44
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dboQ2bkPkWQ+PRCfjf/+0A
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 16:35:44
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QXTesYz1PmqbMqAWCD7FLQ


# You can replace this text with custom code or comments, and it will be preserved on regeneration
Expand Down
6 changes: 3 additions & 3 deletions lib/WTSI/DNAP/Warehouse/Schema/Result/IseqRunStatus.pm
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ __PACKAGE__->belongs_to(
'run_status_dict',
'WTSI::DNAP::Warehouse::Schema::Result::IseqRunStatusDict',
{ id_run_status_dict => 'id_run_status_dict' },
{ is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' },
{ is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' },
);


# Created by DBIx::Class::Schema::Loader v0.07036 @ 2014-10-29 11:55:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:V+5Wt0FmO7gsFYyZ6NKKOQ
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 16:35:44
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0YSdRUTGM7gZDMHVT3JCTg

our $VERSION = '0';

Expand Down
24 changes: 20 additions & 4 deletions lib/WTSI/DNAP/Warehouse/Schema/Result/PacBioProductMetric.pm
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ Product id

The final QC outcome of the product as 0(failed), 1(passed) or NULL

=head2 last_changed

data_type: 'datetime'
datetime_undef_if_invalid: 1
default_value: 'CURRENT_TIMESTAMP'
is_nullable: 1

Date this record was created or changed

=cut

__PACKAGE__->add_columns(
Expand All @@ -92,6 +101,13 @@ __PACKAGE__->add_columns(
{ data_type => 'char', is_nullable => 0, size => 64 },
'qc',
{ data_type => 'tinyint', is_nullable => 1 },
'last_changed',
{
data_type => 'datetime',
datetime_undef_if_invalid => 1,
default_value => 'CURRENT_TIMESTAMP',
is_nullable => 1,
},
);

=head1 PRIMARY KEY
Expand Down Expand Up @@ -155,7 +171,7 @@ __PACKAGE__->belongs_to(
is_deferrable => 1,
join_type => 'LEFT',
on_delete => 'SET NULL',
on_update => 'NO ACTION',
on_update => 'RESTRICT',
},
);

Expand All @@ -171,12 +187,12 @@ __PACKAGE__->belongs_to(
'pac_bio_rw_metrics',
'WTSI::DNAP::Warehouse::Schema::Result::PacBioRunWellMetric',
{ id_pac_bio_rw_metrics_tmp => 'id_pac_bio_rw_metrics_tmp' },
{ is_deferrable => 1, on_delete => 'CASCADE', on_update => 'NO ACTION' },
{ is_deferrable => 1, on_delete => 'CASCADE', on_update => 'RESTRICT' },
);


# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-02-23 11:19:02
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:atOKMZwtqWTqeE7XYU1hlw
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 16:47:29
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hTT2fzNhcm/86YuT61o2Qw

use Carp;

Expand Down
Loading