Bug 30483: DBRev 22.06.00.041

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Tomas Cohen Arazi 2022-09-12 08:39:03 -03:00
parent 2245c5fddf
commit ea3795aa73
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
3 changed files with 16 additions and 13 deletions

View File

@ -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;

View File

@ -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);
},
};

View File

@ -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'
});
},
};