# - #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 = "19.12.00.040";
+$VERSION = "19.12.00.041";
sub version {
return $VERSION;
=head2 priority
data_type: 'smallint'
- is_nullable: 1
+ is_nullable: 0
=head2 found
"reservenotes",
{ data_type => "longtext", is_nullable => 1 },
"priority",
- { data_type => "smallint", is_nullable => 1 },
+ { data_type => "smallint", is_nullable => 0 },
"found",
{ data_type => "varchar", is_nullable => 1, size => 1 },
"timestamp",
);
-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-06-17 07:24:39
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZgGAW7ODBby3hGNJ41eeMA
+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-18 08:36:19
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RDZP4TEaFZUexg9jVg6DbA
sub koha_object_class {
'Koha::Old::Hold';
+++ /dev/null
-$DBversion = 'XXX'; # will be replaced by the RM
-if( CheckVersion( $DBversion ) ) {
- $dbh->do(q|
- ALTER TABLE reserves MODIFY priority SMALLINT(6) NOT NULL
- |);
-
- $dbh->do(q|
- ALTER TABLE old_reserves MODIFY priority SMALLINT(6) NOT NULL
- |);
-
- SetVersion( $DBversion );
- print "Upgrade to $DBversion done (Bug 24722 - Enforce NOT NULL constraint for reserves.priority)\n";
-}
print "Upgrade to $DBversion done (Bug 17374 - update description of DefaultPatronSearchFields)\n";
}
+$DBversion = '19.12.00.041';
+if( CheckVersion( $DBversion ) ) {
+
+ # Update existing NULL priorities
+ $dbh->do(q|
+ UPDATE reserves SET priority = 0 WHERE priority IS NULL
+ |);
+
+ $dbh->do(q|
+ ALTER TABLE reserves MODIFY priority SMALLINT(6) NOT NULL
+ |);
+
+ $dbh->do(q|
+ UPDATE old_reserves SET priority = 0 WHERE priority IS NULL
+ |);
+
+ $dbh->do(q|
+ ALTER TABLE old_reserves MODIFY priority SMALLINT(6) NOT NULL
+ |);
+
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (Bug 24722 - Enforce NOT NULL constraint for reserves.priority)\n";
+}
+
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';