From 806d8543d8b8fb069c317e95613fb643e9ac238b Mon Sep 17 00:00:00 2001 From: Maryse Simard Date: Thu, 21 Jan 2021 01:18:27 -0500 Subject: [PATCH] Bug 17015: Schema file for new discrete_calendar table Signed-off-by: Michal Denar --- Koha/Schema/Result/DiscreteCalendar.pm | 111 +++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 Koha/Schema/Result/DiscreteCalendar.pm diff --git a/Koha/Schema/Result/DiscreteCalendar.pm b/Koha/Schema/Result/DiscreteCalendar.pm new file mode 100644 index 0000000000..6db32c892e --- /dev/null +++ b/Koha/Schema/Result/DiscreteCalendar.pm @@ -0,0 +1,111 @@ +use utf8; +package Koha::Schema::Result::DiscreteCalendar; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +=head1 NAME + +Koha::Schema::Result::DiscreteCalendar + +=cut + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + +=head1 TABLE: C + +=cut + +__PACKAGE__->table("discrete_calendar"); + +=head1 ACCESSORS + +=head2 date + + data_type: 'datetime' + datetime_undef_if_invalid: 1 + is_nullable: 0 + +=head2 branchcode + + data_type: 'varchar' + is_nullable: 0 + size: 10 + +=head2 is_opened + + data_type: 'tinyint' + default_value: 1 + is_nullable: 1 + +=head2 holiday_type + + data_type: 'varchar' + default_value: (empty string) + is_nullable: 1 + size: 1 + +=head2 note + + data_type: 'varchar' + default_value: (empty string) + is_nullable: 1 + size: 30 + +=head2 open_hour + + data_type: 'time' + is_nullable: 0 + +=head2 close_hour + + data_type: 'time' + is_nullable: 0 + +=cut + +__PACKAGE__->add_columns( + "date", + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 0, + }, + "branchcode", + { data_type => "varchar", is_nullable => 0, size => 10 }, + "is_opened", + { data_type => "tinyint", default_value => 1, is_nullable => 1 }, + "holiday_type", + { data_type => "varchar", default_value => "", is_nullable => 1, size => 1 }, + "note", + { data_type => "varchar", default_value => "", is_nullable => 1, size => 30 }, + "open_hour", + { data_type => "time", is_nullable => 0 }, + "close_hour", + { data_type => "time", is_nullable => 0 }, +); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key("branchcode", "date"); + + +# Created by DBIx::Class::Schema::Loader v0.07045 @ 2017-04-19 10:07:41 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wtctW8ZzCkyCZFZmmavFEw + + +# You can replace this text with custom code or comments, and it will be preserved on regeneration +1; -- 2.25.1