From ea3795aa73f4b04a0e1ae673d470434b5ded1ca3 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 12 Sep 2022 08:39:03 -0300 Subject: [PATCH] Bug 30483: DBRev 22.06.00.041 Signed-off-by: Tomas Cohen Arazi --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_30483.pl | 12 ------------ installer/data/mysql/db_revs/220600041.pl | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 13 deletions(-) delete mode 100755 installer/data/mysql/atomicupdate/bug_30483.pl create mode 100755 installer/data/mysql/db_revs/220600041.pl diff --git a/Koha.pm b/Koha.pm index 9cfa855712..5c65ed1576 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "22.06.00.040"; +$VERSION = "22.06.00.041"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_30483.pl b/installer/data/mysql/atomicupdate/bug_30483.pl deleted file mode 100755 index 53eeae9962..0000000000 --- a/installer/data/mysql/atomicupdate/bug_30483.pl +++ /dev/null @@ -1,12 +0,0 @@ -use Modern::Perl; - -return { - bug_number => 30483, - description => "Make issues.borrowernumber and itemnumber NOT NULL", - up => sub { - my ($args) = @_; - my ($dbh, $out) = @$args{qw(dbh out)}; - my $sql = "ALTER TABLE issues MODIFY COLUMN borrowernumber int(11) NOT NULL COMMENT 'foreign key, linking this to the borrowers table for the patron this item was checked out to', MODIFY COLUMN itemnumber int(11) NOT NULL COMMENT 'foreign key, linking this to the items table for the item that was checked out'"; - $dbh->do($sql); - }, -}; diff --git a/installer/data/mysql/db_revs/220600041.pl b/installer/data/mysql/db_revs/220600041.pl new file mode 100755 index 0000000000..1d3f498f4e --- /dev/null +++ b/installer/data/mysql/db_revs/220600041.pl @@ -0,0 +1,15 @@ +use Modern::Perl; + +return { + bug_number => 30483, + description => "Make issues.borrowernumber and issues.itemnumber NOT NULL", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + $dbh->do(q{ + ALTER TABLE issues + MODIFY COLUMN borrowernumber int(11) NOT NULL COMMENT 'foreign key, linking this to the borrowers table for the patron this item was checked out to', + MODIFY COLUMN itemnumber int(11) NOT NULL COMMENT 'foreign key, linking this to the items table for the item that was checked out' + }); + }, +}; -- 2.39.5