Bug 23049: (follow-up) VARCHAR(80) + ac -> account

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2019-10-11 12:33:55 +01:00
parent 87b166e381
commit ff66171ee2
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
5 changed files with 23 additions and 23 deletions

View File

@ -68,7 +68,7 @@ sub _library_limits {
=cut
sub _type {
return 'AccountDebitType';
return 'AccountDebitTypesBranch';
}
1;

View File

@ -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';

View File

@ -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 }

View File

@ -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
}

View File

@ -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,