Skip to content

Commit

Permalink
Stopped generating InstrumentFormat ORM class.
Browse files Browse the repository at this point in the history
Dropped instrument_utilisation table from the db schema,
which is used for testing the tracking web application.

'instrument_utilisation' table has not been used for the
last seven years. The code that filled it in was deleted
some time ago.

Once this change is released, the 'instrument_utilisation'
table can be dropped from the prod. database.
  • Loading branch information
mgcam committed Apr 9, 2024
1 parent 0135663 commit e6bde1c
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 320 deletions.
1 change: 0 additions & 1 deletion MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ lib/npg_tracking/Schema/Result/InstrumentModDict.pm
lib/npg_tracking/Schema/Result/InstrumentStatus.pm
lib/npg_tracking/Schema/Result/InstrumentStatusAnnotation.pm
lib/npg_tracking/Schema/Result/InstrumentStatusDict.pm
lib/npg_tracking/Schema/Result/InstrumentUtilisation.pm
lib/npg_tracking/Schema/Result/Manufacturer.pm
lib/npg_tracking/Schema/Result/Run.pm
lib/npg_tracking/Schema/Result/RunAnnotation.pm
Expand Down
19 changes: 2 additions & 17 deletions lib/npg_tracking/Schema/Result/InstrumentFormat.pm
Original file line number Diff line number Diff line change
Expand Up @@ -147,21 +147,6 @@ __PACKAGE__->set_primary_key("id_instrument_format");

=head1 RELATIONS
=head2 instrument_utilisations
Type: has_many
Related object: L<npg_tracking::Schema::Result::InstrumentUtilisation>
=cut

__PACKAGE__->has_many(
"instrument_utilisations",
"npg_tracking::Schema::Result::InstrumentUtilisation",
{ "foreign.id_instrument_format" => "self.id_instrument_format" },
{ cascade_copy => 0, cascade_delete => 0 },
);

=head2 instruments
Type: has_many
Expand Down Expand Up @@ -208,8 +193,8 @@ __PACKAGE__->has_many(
);


# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:02:30
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:esNDL3mLvW19/fKjWfsX/g
# Created by DBIx::Class::Schema::Loader v0.07052 @ 2024-04-09 10:35:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:elkjaVkCGUOAo8WzkpdV/A

# Author: [email protected]
# Created: 2010-04-08
Expand Down
275 changes: 0 additions & 275 deletions lib/npg_tracking/Schema/Result/InstrumentUtilisation.pm

This file was deleted.

1 change: 1 addition & 0 deletions scripts/npg_tracking_dbix_schema_loader.pl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use_moose => 1,
preserve_case => 1,
use_namespaces => 1,
exclude => qr/instrument_utilisation/,

rel_name_map => sub {
# Rename the id relationship so we can access flat versions of
Expand Down
27 changes: 0 additions & 27 deletions t/data/schema.txt
Original file line number Diff line number Diff line change
Expand Up @@ -293,33 +293,6 @@ CREATE TABLE `instrument_status_dict` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `instrument_utilisation`
--

DROP TABLE IF EXISTS `instrument_utilisation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `instrument_utilisation` (
`id_instrument_utilisation` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`date` date NOT NULL,
`total_insts` int(4) unsigned NOT NULL DEFAULT '0',
`perc_utilisation_total_insts` float(5,2) unsigned NOT NULL DEFAULT '0.00',
`perc_uptime_total_insts` float(5,2) unsigned NOT NULL DEFAULT '0.00',
`official_insts` int(4) unsigned NOT NULL DEFAULT '0',
`perc_utilisation_official_insts` float(5,2) unsigned NOT NULL DEFAULT '0.00',
`perc_uptime_official_insts` float(5,2) unsigned NOT NULL DEFAULT '0.00',
`prod_insts` int(4) unsigned NOT NULL DEFAULT '0',
`perc_utilisation_prod_insts` float(5,2) unsigned NOT NULL DEFAULT '0.00',
`perc_uptime_prod_insts` float(5,2) unsigned NOT NULL DEFAULT '0.00',
`id_instrument_format` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`id_instrument_utilisation`),
UNIQUE KEY `uidx_date_format` (`date`,`id_instrument_format`),
KEY `inst_format` (`id_instrument_format`),
CONSTRAINT `inst_format` FOREIGN KEY (`id_instrument_format`) REFERENCES `instrument_format` (`id_instrument_format`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `manufacturer`
--
Expand Down

0 comments on commit e6bde1c

Please sign in to comment.