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

(-)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