Bug 33262: Add deleted_biblionumber column to aqorders table
This adds a new column deleted_biblionumber to the aqorders table. This will allow us to store the biblionumber of a deleted record, so we will still be able to tell what has been ordered once the record is deleted. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
95520f0fb5
commit
0cf7687e83
2 changed files with 21 additions and 0 deletions
20
installer/data/mysql/atomicupdate/bug_33262.pl
Executable file
20
installer/data/mysql/atomicupdate/bug_33262.pl
Executable file
|
@ -0,0 +1,20 @@
|
|||
use Modern::Perl;
|
||||
|
||||
return {
|
||||
bug_number => "33262",
|
||||
description => "Store biblionumber of deleted record in acquisition orders",
|
||||
up => sub {
|
||||
my ($args) = @_;
|
||||
my ($dbh, $out) = @$args{qw(dbh out)};
|
||||
if ( !column_exists( 'aqorders', 'deleted_biblionumber' ) ) {
|
||||
|
||||
$dbh->do(
|
||||
q{
|
||||
ALTER TABLE `aqorders`
|
||||
ADD COLUMN `deleted_biblionumber` int(11) NULL DEFAULT NULL COMMENT 'links the order to the deleted bibliographic record (deletedbiblio.biblionumber)' AFTER biblionumber
|
||||
}
|
||||
);
|
||||
}
|
||||
say $out "Added column 'aqorders.deleted_biblionumber'";
|
||||
},
|
||||
};
|
|
@ -659,6 +659,7 @@ DROP TABLE IF EXISTS `aqorders`;
|
|||
CREATE TABLE `aqorders` (
|
||||
`ordernumber` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key and unique identifier assigned by Koha to each line',
|
||||
`biblionumber` int(11) DEFAULT NULL COMMENT 'links the order to the biblio being ordered (biblio.biblionumber)',
|
||||
`deleted_biblionumber` int(11) DEFAULT NULL COMMENT 'links the order to the deleted bibliographic record (deletedbiblio.biblionumber)',
|
||||
`entrydate` date DEFAULT NULL COMMENT 'the date the bib was added to the basket',
|
||||
`quantity` smallint(6) DEFAULT NULL COMMENT 'the quantity ordered',
|
||||
`currency` varchar(10) DEFAULT NULL COMMENT 'the currency used for the purchase',
|
||||
|
|
Loading…
Reference in a new issue