collectiontitle text default NULL, -- collection name for the suggested item
itemtype VARCHAR(30) default NULL, -- suggested item type
quantity SMALLINT(6) default NULL, -- suggested quantity to be purchased
- currency VARCHAR(3) default NULL, -- suggested currency for the suggested price
+ currency VARCHAR(10) default NULL, -- suggested currency for the suggested price
price DECIMAL(28,6) default NULL, -- suggested price
total DECIMAL(28,6) default NULL, -- suggested total cost (price*quantity updated for currency)
PRIMARY KEY (`suggestionid`),
`phone` varchar(30) default NULL, -- vendor phone number
`accountnumber` mediumtext, -- unused in Koha
`othersupplier` mediumtext, -- unused in Koha
- `currency` varchar(3) NOT NULL default '', -- unused in Koha
+ `currency` varchar(10) NOT NULL default '', -- unused in Koha
`booksellerfax` mediumtext, -- vendor fax number
`notes` mediumtext, -- order notes
`bookselleremail` mediumtext, -- vendor email
`biblionumber` int(11) default NULL, -- links the order to the biblio being ordered (biblio.biblionumber)
`entrydate` date default NULL, -- the date the bib was added to the basket
`quantity` smallint(6) default NULL, -- the quantity ordered
- `currency` varchar(3) default NULL, -- the currency used for the purchase
+ `currency` varchar(10) default NULL, -- the currency used for the purchase
`listprice` decimal(28,6) default NULL, -- the vendor price for this line item
`datereceived` date default NULL, -- the date this order was received
invoiceid int(11) default NULL, -- id of invoice
$dbh->do(q{
INSERT INTO currency(currency, archived) SELECT distinct currency, 1 FROM aqorders WHERE currency NOT IN (SELECT currency FROM currency);
});
+## Correct the field length in aqorders before adding FK too
+ $dbh->do(q{ ALTER TABLE aqorders MODIFY COLUMN currency varchar(10) default NULL; });
## And finally add the FK
$dbh->do(q{
ALTER TABLE aqorders ADD FOREIGN KEY (currency) REFERENCES currency(currency) ON DELETE SET NULL ON UPDATE SET null;
print "Upgrade to $DBversion done (Bug 15084 - Move the currency related code to Koha::Acquisition::Currenc[y|ies])\n";
SetVersion($DBversion);
- }
+}
$DBversion = "3.23.00.038";
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
});
print "Upgrade to $DBversion done (Bug 14694 - Make decreaseloanHighHolds more flexible)\n";
SetVersion($DBversion);
- }
+}
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
# SEE bug 13068