From 6f82ffe988be7642bfbd9b165e4c2c07f89ddedb Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 15 Aug 2024 12:53:46 +0100 Subject: [PATCH] Bug 10190: DBIC Schema update --- Koha/Schema/Result/MessageTransportType.pm | 21 +- Koha/Schema/Result/Overduerule.pm | 208 ------------------ .../Result/OverduerulesTransportType.pm | 121 ---------- 3 files changed, 2 insertions(+), 348 deletions(-) delete mode 100644 Koha/Schema/Result/Overduerule.pm delete mode 100644 Koha/Schema/Result/OverduerulesTransportType.pm diff --git a/Koha/Schema/Result/MessageTransportType.pm b/Koha/Schema/Result/MessageTransportType.pm index 34dd3de4a75..c30023bf027 100644 --- a/Koha/Schema/Result/MessageTransportType.pm +++ b/Koha/Schema/Result/MessageTransportType.pm @@ -118,23 +118,6 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 overduerules_transport_types - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "overduerules_transport_types", - "Koha::Schema::Result::OverduerulesTransportType", - { - "foreign.message_transport_type" => "self.message_transport_type", - }, - { cascade_copy => 0, cascade_delete => 0 }, -); - =head2 borrower_message_preferences Type: many_to_many @@ -150,8 +133,8 @@ __PACKAGE__->many_to_many( ); -# Created by DBIx::Class::Schema::Loader v0.07025 @ 2014-05-02 18:04:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YpzL/dxDWq//5vqXfvHoVQ +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-08-15 11:53:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Bx96QiqHxZ9SNbgK8dSwMg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Overduerule.pm b/Koha/Schema/Result/Overduerule.pm deleted file mode 100644 index c52005ca508..00000000000 --- a/Koha/Schema/Result/Overduerule.pm +++ /dev/null @@ -1,208 +0,0 @@ -use utf8; -package Koha::Schema::Result::Overduerule; - -# Created by DBIx::Class::Schema::Loader -# DO NOT MODIFY THE FIRST PART OF THIS FILE - -=head1 NAME - -Koha::Schema::Result::Overduerule - -=cut - -use strict; -use warnings; - -use base 'DBIx::Class::Core'; - -=head1 TABLE: C - -=cut - -__PACKAGE__->table("overduerules"); - -=head1 ACCESSORS - -=head2 overduerules_id - - data_type: 'integer' - is_auto_increment: 1 - is_nullable: 0 - -unique identifier for the overduerules - -=head2 branchcode - - data_type: 'varchar' - default_value: (empty string) - is_nullable: 0 - size: 10 - -foreign key from the branches table to define which branch this rule is for (if blank it's all libraries) - -=head2 categorycode - - data_type: 'varchar' - default_value: (empty string) - is_nullable: 0 - size: 10 - -foreign key from the categories table to define which patron category this rule is for - -=head2 delay1 - - data_type: 'integer' - is_nullable: 1 - -number of days after the item is overdue that the first notice is sent - -=head2 letter1 - - data_type: 'varchar' - is_nullable: 1 - size: 20 - -foreign key from the letter table to define which notice should be sent as the first notice - -=head2 debarred1 - - data_type: 'varchar' - default_value: 0 - is_nullable: 1 - size: 1 - -is the patron restricted when the first notice is sent (1 for yes, 0 for no) - -=head2 delay2 - - data_type: 'integer' - is_nullable: 1 - -number of days after the item is overdue that the second notice is sent - -=head2 debarred2 - - data_type: 'varchar' - default_value: 0 - is_nullable: 1 - size: 1 - -is the patron restricted when the second notice is sent (1 for yes, 0 for no) - -=head2 letter2 - - data_type: 'varchar' - is_nullable: 1 - size: 20 - -foreign key from the letter table to define which notice should be sent as the second notice - -=head2 delay3 - - data_type: 'integer' - is_nullable: 1 - -number of days after the item is overdue that the third notice is sent - -=head2 letter3 - - data_type: 'varchar' - is_nullable: 1 - size: 20 - -foreign key from the letter table to define which notice should be sent as the third notice - -=head2 debarred3 - - data_type: 'integer' - default_value: 0 - is_nullable: 1 - -is the patron restricted when the third notice is sent (1 for yes, 0 for no) - -=cut - -__PACKAGE__->add_columns( - "overduerules_id", - { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, - "branchcode", - { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, - "categorycode", - { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, - "delay1", - { data_type => "integer", is_nullable => 1 }, - "letter1", - { data_type => "varchar", is_nullable => 1, size => 20 }, - "debarred1", - { data_type => "varchar", default_value => 0, is_nullable => 1, size => 1 }, - "delay2", - { data_type => "integer", is_nullable => 1 }, - "debarred2", - { data_type => "varchar", default_value => 0, is_nullable => 1, size => 1 }, - "letter2", - { data_type => "varchar", is_nullable => 1, size => 20 }, - "delay3", - { data_type => "integer", is_nullable => 1 }, - "letter3", - { data_type => "varchar", is_nullable => 1, size => 20 }, - "debarred3", - { data_type => "integer", default_value => 0, is_nullable => 1 }, -); - -=head1 PRIMARY KEY - -=over 4 - -=item * L - -=back - -=cut - -__PACKAGE__->set_primary_key("overduerules_id"); - -=head1 UNIQUE CONSTRAINTS - -=head2 C - -=over 4 - -=item * L - -=item * L - -=back - -=cut - -__PACKAGE__->add_unique_constraint("overduerules_branch_cat", ["branchcode", "categorycode"]); - -=head1 RELATIONS - -=head2 overduerules_transport_types - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "overduerules_transport_types", - "Koha::Schema::Result::OverduerulesTransportType", - { "foreign.overduerules_id" => "self.overduerules_id" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - - -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pORigxtC5qztZWHI29mZ/g - -sub koha_object_class { - 'Koha::OverdueRule'; -} -sub koha_objects_class { - 'Koha::OverdueRules'; -} - -1; diff --git a/Koha/Schema/Result/OverduerulesTransportType.pm b/Koha/Schema/Result/OverduerulesTransportType.pm deleted file mode 100644 index e069a599e2c..00000000000 --- a/Koha/Schema/Result/OverduerulesTransportType.pm +++ /dev/null @@ -1,121 +0,0 @@ -use utf8; -package Koha::Schema::Result::OverduerulesTransportType; - -# Created by DBIx::Class::Schema::Loader -# DO NOT MODIFY THE FIRST PART OF THIS FILE - -=head1 NAME - -Koha::Schema::Result::OverduerulesTransportType - -=cut - -use strict; -use warnings; - -use base 'DBIx::Class::Core'; - -=head1 TABLE: C - -=cut - -__PACKAGE__->table("overduerules_transport_types"); - -=head1 ACCESSORS - -=head2 id - - data_type: 'integer' - is_auto_increment: 1 - is_nullable: 0 - -=head2 letternumber - - data_type: 'integer' - default_value: 1 - is_nullable: 0 - -=head2 message_transport_type - - data_type: 'varchar' - default_value: 'email' - is_foreign_key: 1 - is_nullable: 0 - size: 20 - -=head2 overduerules_id - - data_type: 'integer' - is_foreign_key: 1 - is_nullable: 0 - -=cut - -__PACKAGE__->add_columns( - "id", - { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, - "letternumber", - { data_type => "integer", default_value => 1, is_nullable => 0 }, - "message_transport_type", - { - data_type => "varchar", - default_value => "email", - is_foreign_key => 1, - is_nullable => 0, - size => 20, - }, - "overduerules_id", - { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, -); - -=head1 PRIMARY KEY - -=over 4 - -=item * L - -=back - -=cut - -__PACKAGE__->set_primary_key("id"); - -=head1 RELATIONS - -=head2 message_transport_type - -Type: belongs_to - -Related object: L - -=cut - -__PACKAGE__->belongs_to( - "message_transport_type", - "Koha::Schema::Result::MessageTransportType", - { message_transport_type => "message_transport_type" }, - { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, -); - -=head2 overduerule - -Type: belongs_to - -Related object: L - -=cut - -__PACKAGE__->belongs_to( - "overduerule", - "Koha::Schema::Result::Overduerule", - { overduerules_id => "overduerules_id" }, - { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, -); - - -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-03-31 15:44:38 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GV2VZ1kIA9Fl8pQd0qkrjg - - -# You can replace this text with custom code or comments, and it will be preserved on regeneration -1; -- 2.47.0