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

(-)a/Koha/Schema/Result/Aqorder.pm (-2 / +11 lines)
Lines 39-44 primary key and unique identifier assigned by Koha to each line Link Here
39
39
40
links the order to the biblio being ordered (biblio.biblionumber)
40
links the order to the biblio being ordered (biblio.biblionumber)
41
41
42
=head2 deleted_biblionumber
43
44
  data_type: 'integer'
45
  is_nullable: 1
46
47
links the order to the deleted bibliographic record deletedbiblio.biblionumber)
48
42
=head2 entrydate
49
=head2 entrydate
43
50
44
  data_type: 'date'
51
  data_type: 'date'
Lines 438-443 __PACKAGE__->add_columns( Link Here
438
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
445
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
439
  "biblionumber",
446
  "biblionumber",
440
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
447
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
448
  "deleted_biblionumber",
449
  { data_type => "integer", is_nullable => 1 },
441
  "entrydate",
450
  "entrydate",
442
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
451
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
443
  "quantity",
452
  "quantity",
Lines 805-812 Composing rels: L</aqorder_users> -> borrowernumber Link Here
805
__PACKAGE__->many_to_many("borrowernumbers", "aqorder_users", "borrowernumber");
814
__PACKAGE__->many_to_many("borrowernumbers", "aqorder_users", "borrowernumber");
806
815
807
816
808
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-03-06 16:45:06
817
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-05-04 11:17:35
809
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7vMNLDNO0/Bpng9sBFyyBg
818
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VtBQdGGCN86D4CWZLMZX+g
810
819
811
__PACKAGE__->belongs_to(
820
__PACKAGE__->belongs_to(
812
  "basket",
821
  "basket",
(-)a/installer/data/mysql/atomicupdate/bug_33262.pl (+20 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "33262",
5
    description => "Store biblionumber of deleted record in acquisition orders",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        if ( !column_exists( 'aqorders', 'deleted_biblionumber' ) ) {
10
11
            $dbh->do(
12
                q{
13
                ALTER TABLE `aqorders`
14
                    ADD COLUMN `deleted_biblionumber` int(11) NULL DEFAULT NULL COMMENT 'links the order to the deleted bibliographic record (deletedbiblio.biblionumber)' AFTER biblionumber
15
            }
16
            );
17
        }
18
        say $out "Added column 'aqorders.deleted_biblionumber'";
19
    },
20
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 659-664 DROP TABLE IF EXISTS `aqorders`; Link Here
659
CREATE TABLE `aqorders` (
659
CREATE TABLE `aqorders` (
660
  `ordernumber` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key and unique identifier assigned by Koha to each line',
660
  `ordernumber` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key and unique identifier assigned by Koha to each line',
661
  `biblionumber` int(11) DEFAULT NULL COMMENT 'links the order to the biblio being ordered (biblio.biblionumber)',
661
  `biblionumber` int(11) DEFAULT NULL COMMENT 'links the order to the biblio being ordered (biblio.biblionumber)',
662
  `deleted_biblionumber` int(11) DEFAULT NULL COMMENT 'links the order to the deleted bibliographic record (deletedbiblio.biblionumber)',
662
  `entrydate` date DEFAULT NULL COMMENT 'the date the bib was added to the basket',
663
  `entrydate` date DEFAULT NULL COMMENT 'the date the bib was added to the basket',
663
  `quantity` smallint(6) DEFAULT NULL COMMENT 'the quantity ordered',
664
  `quantity` smallint(6) DEFAULT NULL COMMENT 'the quantity ordered',
664
  `currency` varchar(10) DEFAULT NULL COMMENT 'the currency used for the purchase',
665
  `currency` varchar(10) DEFAULT NULL COMMENT 'the currency used for the purchase',
665
- 

Return to bug 33262