From 1baa0c2876b7c43c83a039e6a2eb2d2b46f4cbca Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 6 Feb 2024 13:32:28 +0000 Subject: [PATCH] Bug 36002: Database revision for aqorders.purchaseordernumber Test plan: Run dbrev. Check if field is no longer there. Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall Signed-off-by: Pedro Amorim Signed-off-by: Katrin Fischer --- installer/data/mysql/atomicupdate/bug_36002.pl | 13 +++++++++++++ installer/data/mysql/kohastructure.sql | 1 - 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100755 installer/data/mysql/atomicupdate/bug_36002.pl diff --git a/installer/data/mysql/atomicupdate/bug_36002.pl b/installer/data/mysql/atomicupdate/bug_36002.pl new file mode 100755 index 0000000000..188c48e7e7 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_36002.pl @@ -0,0 +1,13 @@ +use Modern::Perl; + +return { + bug_number => 36002, + description => "Remove aqorders.purchaseordernumber", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + if ( column_exists( 'aqorders', 'purchaseordernumber' ) ) { + $dbh->do(q{ALTER TABLE aqorders DROP COLUMN purchaseordernumber}); + } + }, +}; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 002dbb1cd4..32514adcef 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -739,7 +739,6 @@ CREATE TABLE `aqorders` ( `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', -- 2.39.5