Bugzilla – Attachment 94327 Details for
Bug 23049
Replace MANUAL_INV authorised value with a dedicated table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23049: (follow-up) VARCHAR(80) + ac -> account
Bug-23049-follow-up-VARCHAR80--ac---account.patch (text/plain), 10.65 KB, created by
Martin Renvoize (ashimema)
on 2019-10-16 15:31:40 UTC
(
hide
)
Description:
Bug 23049: (follow-up) VARCHAR(80) + ac -> account
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-10-16 15:31:40 UTC
Size:
10.65 KB
patch
obsolete
>From bc0b44699395dab25936237569c48977cb11575c Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 11 Oct 2019 12:33:55 +0100 >Subject: [PATCH] Bug 23049: (follow-up) VARCHAR(80) + ac -> account > >--- > Koha/Account/DebitType.pm | 2 +- > Koha/Schema/Result/AccountDebitType.pm | 16 ++++++++-------- > ...TypesBranch.pm => AccountDebitTypesBranch.pm} | 16 ++++++++-------- > Koha/Schema/Result/Accountline.pm | 8 ++++---- > Koha/Schema/Result/Branch.pm | 12 ++++++------ > .../data/mysql/atomicupdate/bug_23049_debit.perl | 12 ++++++------ > installer/data/mysql/kohastructure.sql | 12 ++++++------ > 7 files changed, 39 insertions(+), 39 deletions(-) > rename Koha/Schema/Result/{AcDebitTypesBranch.pm => AccountDebitTypesBranch.pm} (79%) > >diff --git a/Koha/Account/DebitType.pm b/Koha/Account/DebitType.pm >index 6324ec57cb..123dce1926 100644 >--- a/Koha/Account/DebitType.pm >+++ b/Koha/Account/DebitType.pm >@@ -68,7 +68,7 @@ sub _library_limits { > =cut > > sub _type { >- return 'AccountDebitType'; >+ return 'AccountDebitTypesBranch'; > } > > 1; >diff --git a/Koha/Schema/Result/AccountDebitType.pm b/Koha/Schema/Result/AccountDebitType.pm >index 69f49dabeb..3ffb68b635 100644 >--- a/Koha/Schema/Result/AccountDebitType.pm >+++ b/Koha/Schema/Result/AccountDebitType.pm >@@ -27,7 +27,7 @@ __PACKAGE__->table("account_debit_types"); > > data_type: 'varchar' > is_nullable: 0 >- size: 64 >+ size: 80 > > =head2 description > >@@ -57,7 +57,7 @@ __PACKAGE__->table("account_debit_types"); > > __PACKAGE__->add_columns( > "code", >- { data_type => "varchar", is_nullable => 0, size => 64 }, >+ { data_type => "varchar", is_nullable => 0, size => 80 }, > "description", > { data_type => "varchar", is_nullable => 1, size => 200 }, > "can_be_added_manually", >@@ -82,17 +82,17 @@ __PACKAGE__->set_primary_key("code"); > > =head1 RELATIONS > >-=head2 ac_debit_types_branches >+=head2 account_debit_types_branches > > Type: has_many > >-Related object: L<Koha::Schema::Result::AcDebitTypesBranch> >+Related object: L<Koha::Schema::Result::AccountDebitTypesBranch> > > =cut > > __PACKAGE__->has_many( >- "ac_debit_types_branches", >- "Koha::Schema::Result::AcDebitTypesBranch", >+ "account_debit_types_branches", >+ "Koha::Schema::Result::AccountDebitTypesBranch", > { "foreign.debit_type_code" => "self.code" }, > { cascade_copy => 0, cascade_delete => 0 }, > ); >@@ -113,8 +113,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-08 11:15:31 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:a3+iyqpi4NVpNjDkr9HM/w >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-11 11:36:33 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cDUy38YCBUs7I7mIknaasQ > > __PACKAGE__->add_columns( > '+is_system' => { is_boolean => 1 } >diff --git a/Koha/Schema/Result/AcDebitTypesBranch.pm b/Koha/Schema/Result/AccountDebitTypesBranch.pm >similarity index 79% >rename from Koha/Schema/Result/AcDebitTypesBranch.pm >rename to Koha/Schema/Result/AccountDebitTypesBranch.pm >index 26e5825171..46334c147d 100644 >--- a/Koha/Schema/Result/AcDebitTypesBranch.pm >+++ b/Koha/Schema/Result/AccountDebitTypesBranch.pm >@@ -1,12 +1,12 @@ > use utf8; >-package Koha::Schema::Result::AcDebitTypesBranch; >+package Koha::Schema::Result::AccountDebitTypesBranch; > > # Created by DBIx::Class::Schema::Loader > # DO NOT MODIFY THE FIRST PART OF THIS FILE > > =head1 NAME > >-Koha::Schema::Result::AcDebitTypesBranch >+Koha::Schema::Result::AccountDebitTypesBranch > > =cut > >@@ -15,11 +15,11 @@ use warnings; > > use base 'DBIx::Class::Core'; > >-=head1 TABLE: C<ac_debit_types_branches> >+=head1 TABLE: C<account_debit_types_branches> > > =cut > >-__PACKAGE__->table("ac_debit_types_branches"); >+__PACKAGE__->table("account_debit_types_branches"); > > =head1 ACCESSORS > >@@ -28,7 +28,7 @@ __PACKAGE__->table("ac_debit_types_branches"); > data_type: 'varchar' > is_foreign_key: 1 > is_nullable: 1 >- size: 64 >+ size: 80 > > =head2 branchcode > >@@ -41,7 +41,7 @@ __PACKAGE__->table("ac_debit_types_branches"); > > __PACKAGE__->add_columns( > "debit_type_code", >- { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 64 }, >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 }, > "branchcode", > { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, > ); >@@ -89,8 +89,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-04 07:57:30 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uVA4axnWjQjFOPqvM0hqyw >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-11 11:36:33 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HFOAT6jt7WwLp0myHu/dDA > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Accountline.pm b/Koha/Schema/Result/Accountline.pm >index 48b3dca958..a30290dcab 100644 >--- a/Koha/Schema/Result/Accountline.pm >+++ b/Koha/Schema/Result/Accountline.pm >@@ -74,7 +74,7 @@ __PACKAGE__->table("accountlines"); > data_type: 'varchar' > is_foreign_key: 1 > is_nullable: 1 >- size: 64 >+ size: 80 > > =head2 status > >@@ -151,7 +151,7 @@ __PACKAGE__->add_columns( > "accounttype", > { data_type => "varchar", is_nullable => 1, size => 80 }, > "debit_type_code", >- { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 64 }, >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 }, > "status", > { data_type => "varchar", is_nullable => 1, size => 16 }, > "payment_type", >@@ -342,8 +342,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-08 11:15:31 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1Vgkg0JR7RqmkniOmUoUhQ >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-11 11:36:33 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WZ2Mcd5gwQc69yDSEsJHGA > > sub koha_objects_class { > 'Koha::Account::Lines'; >diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm >index fa9679eb2e..579edb8e39 100644 >--- a/Koha/Schema/Result/Branch.pm >+++ b/Koha/Schema/Result/Branch.pm >@@ -211,17 +211,17 @@ __PACKAGE__->set_primary_key("branchcode"); > > =head1 RELATIONS > >-=head2 ac_debit_types_branches >+=head2 account_debit_types_branches > > Type: has_many > >-Related object: L<Koha::Schema::Result::AcDebitTypesBranch> >+Related object: L<Koha::Schema::Result::AccountDebitTypesBranch> > > =cut > > __PACKAGE__->has_many( >- "ac_debit_types_branches", >- "Koha::Schema::Result::AcDebitTypesBranch", >+ "account_debit_types_branches", >+ "Koha::Schema::Result::AccountDebitTypesBranch", > { "foreign.branchcode" => "self.branchcode" }, > { cascade_copy => 0, cascade_delete => 0 }, > ); >@@ -692,8 +692,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-09-26 15:59:23 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IiEBfDpMBAi9cv7OqevVRQ >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-11 11:36:33 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HCQKMSgKhVKtDSrvs1IeRg > > __PACKAGE__->add_columns( > '+pickup_location' => { is_boolean => 1 } >diff --git a/installer/data/mysql/atomicupdate/bug_23049_debit.perl b/installer/data/mysql/atomicupdate/bug_23049_debit.perl >index 0fab0a600d..fd3faa306f 100644 >--- a/installer/data/mysql/atomicupdate/bug_23049_debit.perl >+++ b/installer/data/mysql/atomicupdate/bug_23049_debit.perl >@@ -5,7 +5,7 @@ if ( CheckVersion($DBversion) ) { > $dbh->do( > qq{ > CREATE TABLE IF NOT EXISTS account_debit_types ( >- code varchar(64) NOT NULL, >+ code varchar(80) NOT NULL, > description varchar(200) NULL, > can_be_added_manually tinyint(4) NOT NULL DEFAULT 1, > default_amount decimal(28, 6) NULL, >@@ -15,11 +15,11 @@ if ( CheckVersion($DBversion) ) { > } > ); > >- # Adding ac_debit_types_branches >+ # Adding account_debit_types_branches > $dbh->do( > qq{ >- CREATE TABLE IF NOT EXISTS ac_debit_types_branches ( >- debit_type_code VARCHAR(64), >+ CREATE TABLE IF NOT EXISTS account_debit_types_branches ( >+ debit_type_code VARCHAR(80), > branchcode VARCHAR(10), > FOREIGN KEY (debit_type_code) REFERENCES account_debit_types(code) ON DELETE CASCADE, > FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE >@@ -93,7 +93,7 @@ if ( CheckVersion($DBversion) ) { > is_system > ) > SELECT >- SUBSTR(authorised_value, 1, 64), >+ SUBSTR(authorised_value, 1, 80), > lib, > authorised_value, > 1, >@@ -111,7 +111,7 @@ if ( CheckVersion($DBversion) ) { > qq{ > ALTER IGNORE TABLE accountlines > ADD >- debit_type_code varchar(64) DEFAULT NULL >+ debit_type_code varchar(80) DEFAULT NULL > AFTER > accounttype > } >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 7ff520decc..e720809171 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2627,7 +2627,7 @@ CREATE TABLE `cash_registers` ( > > DROP TABLE IF EXISTS `account_debit_types`; > CREATE TABLE `account_debit_types` ( >- `code` varchar(64) NOT NULL, >+ `code` varchar(80) NOT NULL, > `description` varchar(200) DEFAULT NULL, > `can_be_added_manually` tinyint(4) NOT NULL DEFAULT 1, > `default_amount` decimal(28,6) DEFAULT NULL, >@@ -2636,12 +2636,12 @@ CREATE TABLE `account_debit_types` ( > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > > -- >--- Table structure for table `ac_debit_types_branches` >+-- Table structure for table `account_debit_types_branches` > -- > >-DROP TABLE IF EXISTS `ac_debit_types_branches`; >-CREATE TABLE `ac_debit_types_branches` ( >- `debit_type_code` VARCHAR(64), >+DROP TABLE IF EXISTS `account_debit_types_branches`; >+CREATE TABLE `account_debit_types_branches` ( >+ `debit_type_code` VARCHAR(80), > `branchcode` VARCHAR(10), > FOREIGN KEY (`debit_type_code`) REFERENCES `account_debit_types` (`code`) ON DELETE CASCADE, > FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE >@@ -2661,7 +2661,7 @@ CREATE TABLE `accountlines` ( > `amount` decimal(28,6) default NULL, > `description` LONGTEXT, > `accounttype` varchar(80) default NULL, >- `debit_type_code` varchar(64) default NULL, >+ `debit_type_code` varchar(80) default NULL, > `status` varchar(16) default NULL, > `payment_type` varchar(80) default NULL, -- optional authorised value PAYMENT_TYPE > `amountoutstanding` decimal(28,6) default NULL, >-- >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 23049
:
93513
|
93514
|
93515
|
93516
|
93518
|
93519
|
93520
|
93521
|
93522
|
93523
|
93529
|
93557
|
93564
|
93565
|
93567
|
93568
|
93569
|
93570
|
93571
|
93572
|
93573
|
93574
|
93575
|
93576
|
93577
|
93578
|
93579
|
93960
|
93961
|
93962
|
93963
|
93964
|
93965
|
93966
|
93967
|
93968
|
93969
|
93970
|
93972
|
93973
|
93974
|
93975
|
93976
|
93977
|
93978
|
93979
|
93989
|
93990
|
93991
|
93992
|
93993
|
93994
|
93995
|
93996
|
93997
|
93998
|
93999
|
94000
|
94001
|
94002
|
94003
|
94004
|
94005
|
94006
|
94007
|
94008
|
94073
|
94074
|
94075
|
94076
|
94077
|
94078
|
94079
|
94080
|
94081
|
94082
|
94083
|
94084
|
94085
|
94086
|
94087
|
94088
|
94089
|
94090
|
94091
|
94092
|
94093
|
94111
|
94112
|
94113
|
94114
|
94115
|
94116
|
94117
|
94118
|
94119
|
94120
|
94121
|
94122
|
94123
|
94124
|
94125
|
94126
|
94127
|
94128
|
94129
|
94130
|
94131
|
94132
|
94133
|
94134
|
94135
|
94136
|
94137
|
94138
|
94139
|
94140
|
94141
|
94142
|
94143
|
94144
|
94145
|
94146
|
94147
|
94148
|
94149
|
94150
|
94151
|
94152
|
94165
|
94307
|
94308
|
94309
|
94310
|
94311
|
94312
|
94313
|
94314
|
94315
|
94316
|
94317
|
94318
|
94319
|
94320
|
94321
|
94323
|
94324
|
94325
|
94326
|
94327
|
94328
|
94329
|
94331
|
94332
|
94333
|
94334
|
94335
|
94336
|
94337
|
94338
|
94339
|
94340
|
94341
|
94342
|
94343
|
94344
|
94345
|
94346
|
94347
|
94348
|
94349
|
94350
|
94351
|
94352
|
94648