Olá!
Acredito que um backup não será eficaz, considerando que a atualização já fez algumas alterações na base de dados…
Você tentou apagar e criar novamente a tabela em questão?
O procedimento é o seguinte:
- Logar no banco de dados e escolher a base do Koha em questão;
- Usar os seguintes comandos, para recriar a tabela com a versão atualizada:
DROP TABLE IF EXISTS `aqorders`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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',
`listprice` decimal(28,6) DEFAULT NULL COMMENT 'the vendor price for this line item',
`datereceived` date DEFAULT NULL COMMENT 'the date this order was received',
`invoiceid` int(11) DEFAULT NULL COMMENT 'id of invoice',
`freight` decimal(28,6) DEFAULT NULL COMMENT 'shipping costs (not used)',
`unitprice` decimal(28,6) DEFAULT NULL COMMENT 'the actual cost entered when receiving this line item',
`unitprice_tax_excluded` decimal(28,6) DEFAULT NULL COMMENT 'the unit price excluding tax (on receiving)',
`unitprice_tax_included` decimal(28,6) DEFAULT NULL COMMENT 'the unit price including tax (on receiving)',
`quantityreceived` smallint(6) NOT NULL DEFAULT 0 COMMENT 'the quantity that have been received so far',
`created_by` int(11) DEFAULT NULL COMMENT 'the borrowernumber of order line''s creator',
`datecancellationprinted` date DEFAULT NULL COMMENT 'the date the line item was deleted',
`cancellationreason` mediumtext DEFAULT NULL COMMENT 'reason of cancellation',
`order_internalnote` longtext DEFAULT NULL COMMENT 'notes related to this order line, made for staff',
`order_vendornote` longtext DEFAULT NULL COMMENT 'notes related to this order line, made for vendor',
`purchaseordernumber` longtext DEFAULT NULL COMMENT 'not used? always NULL',
`basketno` int(11) DEFAULT NULL COMMENT 'links this order line to a specific basket (aqbasket.basketno)',
`timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'the date and time this order line was last modified',
`rrp` decimal(13,2) DEFAULT NULL COMMENT 'the retail cost for this line item',
`replacementprice` decimal(28,6) DEFAULT NULL COMMENT 'the replacement cost for this line item',
`rrp_tax_excluded` decimal(28,6) DEFAULT NULL COMMENT 'the replacement cost excluding tax',
`rrp_tax_included` decimal(28,6) DEFAULT NULL COMMENT 'the replacement cost including tax',
`ecost` decimal(13,2) DEFAULT NULL COMMENT 'the replacement cost for this line item',
`ecost_tax_excluded` decimal(28,6) DEFAULT NULL COMMENT 'the estimated cost excluding tax',
`ecost_tax_included` decimal(28,6) DEFAULT NULL COMMENT 'the estimated cost including tax',
`tax_rate_bak` decimal(6,4) DEFAULT NULL COMMENT 'the tax rate for this line item (%)',
`tax_rate_on_ordering` decimal(6,4) DEFAULT NULL COMMENT 'the tax rate on ordering for this line item (%)',
`tax_rate_on_receiving` decimal(6,4) DEFAULT NULL COMMENT 'the tax rate on receiving for this line item (%)',
`tax_value_bak` decimal(28,6) DEFAULT NULL COMMENT 'the tax value for this line item',
`tax_value_on_ordering` decimal(28,6) DEFAULT NULL COMMENT 'the tax value on ordering for this line item',
`tax_value_on_receiving` decimal(28,6) DEFAULT NULL COMMENT 'the tax value on receiving for this line item',
`discount` float(6,4) DEFAULT NULL COMMENT 'the discount for this line item (%)',
`budget_id` int(11) NOT NULL COMMENT 'the fund this order goes against (aqbudgets.budget_id)',
`budgetdate` date DEFAULT NULL COMMENT 'not used? always NULL',
`sort1` varchar(80) DEFAULT NULL COMMENT 'statistical field',
`sort2` varchar(80) DEFAULT NULL COMMENT 'second statistical field',
`sort1_authcat` varchar(10) DEFAULT NULL,
`sort2_authcat` varchar(10) DEFAULT NULL,
`uncertainprice` tinyint(1) DEFAULT NULL COMMENT 'was this price uncertain (1 for yes, 0 for no)',
`subscriptionid` int(11) DEFAULT NULL COMMENT 'links this order line to a subscription (subscription.subscriptionid)',
`parent_ordernumber` int(11) DEFAULT NULL COMMENT 'ordernumber of parent order line, or same as ordernumber if no parent',
`orderstatus` varchar(16) DEFAULT 'new' COMMENT 'the current status for this line item. Can be ''new'', ''ordered'', ''partial'', ''complete'' or ''cancelled''',
`line_item_id` varchar(35) DEFAULT NULL COMMENT 'Supplier''s article id for Edifact orderline',
`suppliers_reference_number` varchar(35) DEFAULT NULL COMMENT 'Suppliers unique edifact quote ref',
`suppliers_reference_qualifier` varchar(3) DEFAULT NULL COMMENT 'Type of number above usually ''QLI''',
`suppliers_report` mediumtext DEFAULT NULL COMMENT 'reports received from suppliers',
`estimated_delivery_date` date DEFAULT NULL COMMENT 'Estimated delivery date',
`invoice_unitprice` decimal(28,6) DEFAULT NULL COMMENT 'the unit price in foreign currency',
`invoice_currency` varchar(10) DEFAULT NULL COMMENT 'the currency of the invoice_unitprice',
PRIMARY KEY (`ordernumber`),
KEY `basketno` (`basketno`),
KEY `biblionumber` (`biblionumber`),
KEY `budget_id` (`budget_id`),
KEY `parent_ordernumber` (`parent_ordernumber`),
KEY `orderstatus` (`orderstatus`),
KEY `aqorders_created_by` (`created_by`),
KEY `aqorders_ibfk_3` (`invoiceid`),
KEY `aqorders_subscriptionid` (`subscriptionid`),
KEY `aqorders_currency` (`currency`),
KEY `aqorders_invoice_currency` (`invoice_currency`),
CONSTRAINT `aqorders_budget_id_fk` FOREIGN KEY (`budget_id`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `aqorders_created_by` FOREIGN KEY (`created_by`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `aqorders_currency` FOREIGN KEY (`currency`) REFERENCES `currency` (`currency`) ON DELETE SET NULL ON UPDATE SET NULL,
CONSTRAINT `aqorders_ibfk_1` FOREIGN KEY (`basketno`) REFERENCES `aqbasket` (`basketno`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `aqorders_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `aqorders_ibfk_3` FOREIGN KEY (`invoiceid`) REFERENCES `aqinvoices` (`invoiceid`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `aqorders_invoice_currency` FOREIGN KEY (`invoice_currency`) REFERENCES `currency` (`currency`) ON DELETE SET NULL ON UPDATE SET NULL,
CONSTRAINT `aqorders_subscriptionid` FOREIGN KEY (`subscriptionid`) REFERENCES `subscription` (`subscriptionid`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;