diff --git a/Koha/Schema/Result/Deleteditem.pm b/Koha/Schema/Result/Deleteditem.pm index a681163b1e..45673bb84f 100644 --- a/Koha/Schema/Result/Deleteditem.pm +++ b/Koha/Schema/Result/Deleteditem.pm @@ -58,10 +58,9 @@ item barcode (MARC21 952$p) =head2 bookable data_type: 'tinyint' - default_value: 0 - is_nullable: 0 + is_nullable: 1 -boolean value defining whether this item is available for bookings or not +nullable boolean value defining whether this this item is available for bookings or not =head2 dateaccessioned @@ -405,7 +404,7 @@ __PACKAGE__->add_columns( "barcode", { data_type => "varchar", is_nullable => 1, size => 20 }, "bookable", - { data_type => "tinyint", default_value => 0, is_nullable => 0 }, + { data_type => "tinyint", is_nullable => 1 }, "dateaccessioned", { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "booksellerid", @@ -532,8 +531,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("itemnumber"); -# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-08-23 15:47:56 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YYwxdwFVXmG0NJ0oFd8bUg +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-10-25 13:25:14 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:O22k3Wztw3YjkijGj+Xakw __PACKAGE__->add_columns( '+bookable' => { is_boolean => 1 }, diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm index 92fe4d1088..e8ad9b3828 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -60,10 +60,9 @@ item barcode (MARC21 952$p) =head2 bookable data_type: 'tinyint' - default_value: 0 - is_nullable: 0 + is_nullable: 1 -boolean value defining whether this item is available for bookings or not +nullable boolean value defining whether this this item is available for bookings or not =head2 dateaccessioned @@ -419,7 +418,7 @@ __PACKAGE__->add_columns( "barcode", { data_type => "varchar", is_nullable => 1, size => 20 }, "bookable", - { data_type => "tinyint", default_value => 0, is_nullable => 0 }, + { data_type => "tinyint", is_nullable => 1 }, "dateaccessioned", { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "booksellerid", @@ -992,8 +991,8 @@ __PACKAGE__->might_have( ); -# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-08-23 15:47:56 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5OoZ3tUXC5pzN5JXWWu7fA +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-10-25 13:25:14 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gsZwsPbmOacCDxRbnl5w/A __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); diff --git a/Koha/Schema/Result/Itemtype.pm b/Koha/Schema/Result/Itemtype.pm index b900e8dc32..46aa24926d 100644 --- a/Koha/Schema/Result/Itemtype.pm +++ b/Koha/Schema/Result/Itemtype.pm @@ -176,6 +176,14 @@ Group this item type with others with the same value on OPAC search options If automatic checkin is enabled for items of this type +=head2 bookable + + data_type: 'tinyint' + default_value: 0 + is_nullable: 0 + +Activate bookable feature for items related to this item type + =cut __PACKAGE__->add_columns( @@ -222,6 +230,8 @@ __PACKAGE__->add_columns( { data_type => "varchar", is_nullable => 1, size => 80 }, "automatic_checkin", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, + "bookable", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, ); =head1 PRIMARY KEY @@ -334,8 +344,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-05-08 14:38:07 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9NChRQA4eBUqHpLXUFmOuw +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-10-25 13:25:14 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jd0dYE700dpg1IiRnfbcEg __PACKAGE__->add_columns( '+automatic_checkin' => { is_boolean => 1 },