Bugzilla – Attachment 122272 Details for
Bug 22435
Clarify account_offset types by converting them to clear codes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22435: Update DBIC Schema's
Bug-22435-Update-DBIC-Schemas.patch (text/plain), 3.65 KB, created by
Martin Renvoize (ashimema)
on 2021-06-22 07:53:21 UTC
(
hide
)
Description:
Bug 22435: Update DBIC Schema's
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-06-22 07:53:21 UTC
Size:
3.65 KB
patch
obsolete
>From c03852b8013d107a5c7774e56c321631caace6f8 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 21 Jun 2021 16:41:54 +0100 >Subject: [PATCH] Bug 22435: Update DBIC Schema's > >--- > Koha/Schema/Result/AccountOffset.pm | 38 ++++++------- > Koha/Schema/Result/AccountOffsetType.pm | 76 ------------------------- > 2 files changed, 17 insertions(+), 97 deletions(-) > delete mode 100644 Koha/Schema/Result/AccountOffsetType.pm > >diff --git a/Koha/Schema/Result/AccountOffset.pm b/Koha/Schema/Result/AccountOffset.pm >index 0bde09394c..1b1e4bea09 100644 >--- a/Koha/Schema/Result/AccountOffset.pm >+++ b/Koha/Schema/Result/AccountOffset.pm >@@ -49,10 +49,9 @@ The id of the accountline that decreased the patron's balance > > =head2 type > >- data_type: 'varchar' >- is_foreign_key: 1 >+ data_type: 'enum' >+ extra: {list => ["CREATE","APPLY","VOID","OVERDUE_INCREASE","OVERDUE_DECREASE"]} > is_nullable: 0 >- size: 16 > > The type of offset this is > >@@ -81,7 +80,19 @@ __PACKAGE__->add_columns( > "debit_id", > { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, > "type", >- { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 16 }, >+ { >+ data_type => "enum", >+ extra => { >+ list => [ >+ "CREATE", >+ "APPLY", >+ "VOID", >+ "OVERDUE_INCREASE", >+ "OVERDUE_DECREASE", >+ ], >+ }, >+ is_nullable => 0, >+ }, > "amount", > { data_type => "decimal", is_nullable => 0, size => [26, 6] }, > "created_on", >@@ -147,24 +158,9 @@ __PACKAGE__->belongs_to( > }, > ); > >-=head2 type >- >-Type: belongs_to >- >-Related object: L<Koha::Schema::Result::AccountOffsetType> >- >-=cut >- >-__PACKAGE__->belongs_to( >- "type", >- "Koha::Schema::Result::AccountOffsetType", >- { type => "type" }, >- { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >-); >- > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:d6cqxL2VddjOmUqe3nLptw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-06-21 15:27:32 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zCeE/SWvdz898zlfcvfRGg > > sub koha_object_class { > 'Koha::Account::Offset'; >diff --git a/Koha/Schema/Result/AccountOffsetType.pm b/Koha/Schema/Result/AccountOffsetType.pm >deleted file mode 100644 >index f046b81197..0000000000 >--- a/Koha/Schema/Result/AccountOffsetType.pm >+++ /dev/null >@@ -1,76 +0,0 @@ >-use utf8; >-package Koha::Schema::Result::AccountOffsetType; >- >-# Created by DBIx::Class::Schema::Loader >-# DO NOT MODIFY THE FIRST PART OF THIS FILE >- >-=head1 NAME >- >-Koha::Schema::Result::AccountOffsetType >- >-=cut >- >-use strict; >-use warnings; >- >-use base 'DBIx::Class::Core'; >- >-=head1 TABLE: C<account_offset_types> >- >-=cut >- >-__PACKAGE__->table("account_offset_types"); >- >-=head1 ACCESSORS >- >-=head2 type >- >- data_type: 'varchar' >- is_nullable: 0 >- size: 16 >- >-The type of offset this is >- >-=cut >- >-__PACKAGE__->add_columns( >- "type", >- { data_type => "varchar", is_nullable => 0, size => 16 }, >-); >- >-=head1 PRIMARY KEY >- >-=over 4 >- >-=item * L</type> >- >-=back >- >-=cut >- >-__PACKAGE__->set_primary_key("type"); >- >-=head1 RELATIONS >- >-=head2 account_offsets >- >-Type: has_many >- >-Related object: L<Koha::Schema::Result::AccountOffset> >- >-=cut >- >-__PACKAGE__->has_many( >- "account_offsets", >- "Koha::Schema::Result::AccountOffset", >- { "foreign.type" => "self.type" }, >- { 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:HGUopAaOUF8FcmqQjIrRiw >- >- >-# You can replace this text with custom code or comments, and it will be preserved on regeneration >-1; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22435
:
118340
|
118341
|
118541
|
118542
|
118543
|
118544
|
118545
|
118546
|
118547
|
120040
|
120041
|
120042
|
120043
|
120044
|
120045
|
120046
|
120963
|
120964
|
120965
|
120966
|
120967
|
120968
|
120969
|
120970
|
120979
|
120980
|
120981
|
120982
|
120983
|
120984
|
120985
|
120986
|
120987
|
120988
|
120989
|
120990
|
120991
|
121004
|
121005
|
121006
|
121007
|
121008
|
121009
|
121010
|
121011
|
121012
|
121013
|
121014
|
121015
|
121016
|
121028
|
121757
|
121758
|
121759
|
121760
|
121761
|
121762
|
121763
|
121764
|
121765
|
121766
|
121767
|
121768
|
121769
|
121960
|
121961
|
121962
|
121963
|
121964
|
121965
|
121966
|
121967
|
121968
|
121969
|
121970
|
121971
|
121972
|
122148
|
122149
|
122150
|
122151
|
122152
|
122153
|
122154
|
122155
|
122156
|
122157
|
122158
|
122159
|
122160
|
122161
|
122235
|
122236
|
122237
|
122238
|
122239
|
122240
|
122241
|
122242
|
122243
|
122244
|
122245
|
122246
|
122247
|
122248
|
122249
|
122250
|
122251
|
122252
|
122253
|
122256
|
122257
|
122258
|
122259
|
122260
|
122261
|
122262
|
122263
|
122264
|
122265
|
122266
|
122267
|
122268
|
122269
|
122270
|
122271
|
122272
|
122273
|
122274
|
122553
|
122554
|
122555
|
122556
|
122557
|
122558
|
122559
|
122560
|
122561
|
122562
|
122563
|
122564
|
122565
|
122566
|
122567
|
122568
|
122569
|
122570
|
122571
|
122586
|
122899
|
122900
|
122901
|
122902
|
122903
|
122904
|
122905
|
122906
|
122907
|
122908
|
122909
|
122910
|
122911
|
122912
|
122913
|
122914
|
122915
|
122916
|
122917
|
122918
|
122937
|
123423
|
123424
|
123425
|
123426
|
123427
|
123428
|
123429
|
123430
|
123431
|
123432
|
123433
|
123434
|
123435
|
123436
|
123437
|
123438
|
123439
|
123440
|
123441
|
123442
|
123443