View | Details | Raw Unified | Return to bug 33641
Collapse All | Expand All

(-)a/Koha/Schema/Result/Issue.pm (-2 / +12 lines)
Lines 79-84 foreign key, linking to the branches table for the location the item was checked Link Here
79
79
80
date the item was returned, will be NULL until moved to old_issues
80
date the item was returned, will be NULL until moved to old_issues
81
81
82
=head2 return_branch
83
84
  data_type: 'varchar'
85
  is_nullable: 1
86
  size: 10
87
88
foreign key, linking to the branches table for the location the item was checked out
89
82
=head2 lastreneweddate
90
=head2 lastreneweddate
83
91
84
  data_type: 'datetime'
92
  data_type: 'datetime'
Lines 191-196 __PACKAGE__->add_columns( Link Here
191
    datetime_undef_if_invalid => 1,
199
    datetime_undef_if_invalid => 1,
192
    is_nullable => 1,
200
    is_nullable => 1,
193
  },
201
  },
202
  "return_branch",
203
  { data_type => "varchar", is_nullable => 1, size => 10 },
194
  "lastreneweddate",
204
  "lastreneweddate",
195
  {
205
  {
196
    data_type => "datetime",
206
    data_type => "datetime",
Lines 311-318 __PACKAGE__->belongs_to( Link Here
311
);
321
);
312
322
313
323
314
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-12 11:34:50
324
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2024-08-06 16:06:37
315
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eNzDAKc3bmTLWeDu8u4nTQ
325
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hSiUDS3csy2TMnMIhHrl0g
316
326
317
__PACKAGE__->add_columns(
327
__PACKAGE__->add_columns(
318
    '+auto_renew'      => { is_boolean => 1 },
328
    '+auto_renew'      => { is_boolean => 1 },
(-)a/Koha/Schema/Result/OldIssue.pm (-2 / +12 lines)
Lines 78-83 foreign key, linking to the branches table for the location the item was checked Link Here
78
78
79
date the item was returned
79
date the item was returned
80
80
81
=head2 return_branch
82
83
  data_type: 'varchar'
84
  is_nullable: 1
85
  size: 10
86
87
foreign key, linking to the branches table for the location the item was checked out
88
81
=head2 lastreneweddate
89
=head2 lastreneweddate
82
90
83
  data_type: 'datetime'
91
  data_type: 'datetime'
Lines 190-195 __PACKAGE__->add_columns( Link Here
190
    datetime_undef_if_invalid => 1,
198
    datetime_undef_if_invalid => 1,
191
    is_nullable => 1,
199
    is_nullable => 1,
192
  },
200
  },
201
  "return_branch",
202
  { data_type => "varchar", is_nullable => 1, size => 10 },
193
  "lastreneweddate",
203
  "lastreneweddate",
194
  {
204
  {
195
    data_type => "datetime",
205
    data_type => "datetime",
Lines 306-313 __PACKAGE__->belongs_to( Link Here
306
);
316
);
307
317
308
318
309
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-18 12:35:21
319
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2024-08-06 16:06:37
310
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0XlDHyg8uB3oD9/jJtOxRg
320
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gUCScHz5jPId/nP/IJJHVg
311
321
312
__PACKAGE__->add_columns(
322
__PACKAGE__->add_columns(
313
    '+auto_renew'      => { is_boolean => 1 },
323
    '+auto_renew'      => { is_boolean => 1 },
(-)a/installer/data/mysql/atomicupdate/bug_33641.pl (-5 / +4 lines)
Lines 5-17 return { Link Here
5
    bug_number  => "33641",
5
    bug_number  => "33641",
6
    description => "Added issues.return_branch and old_issues.return_branch",
6
    description => "Added issues.return_branch and old_issues.return_branch",
7
    up          => sub {
7
    up          => sub {
8
        my ($args) = @_; 
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
10
11
        if( !column_exists( 'issues', 'return_branch' ) ) { 
11
        if( !column_exists( 'issues', 'return_branch' ) ) {
12
            $dbh->do(q{
12
            $dbh->do(q{
13
                ALTER TABLE issues
13
                ALTER TABLE issues
14
                ADD COLUMN return_branch varchar(10) DEFAULT NULL 
14
                ADD COLUMN return_branch varchar(10) DEFAULT NULL
15
                COMMENT 'foreign key, linking to the branches table for the location the item was checked out'
15
                COMMENT 'foreign key, linking to the branches table for the location the item was checked out'
16
                AFTER returndate
16
                AFTER returndate
17
            });
17
            });
Lines 28-32 return { Link Here
28
            say_success( $out, "Added column 'old_issues.return_branch'");
28
            say_success( $out, "Added column 'old_issues.return_branch'");
29
        }
29
        }
30
30
31
    },  
31
    },
32
};
32
};
33
- 

Return to bug 33641