Bug 14610 - Update Schema files

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Kyle Hall 2016-10-24 13:57:10 +00:00
parent 9f91b2c1f1
commit c541a967d6
6 changed files with 349 additions and 10 deletions

View file

@ -0,0 +1,265 @@
use utf8;
package Koha::Schema::Result::ArticleRequest;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Koha::Schema::Result::ArticleRequest
=cut
use strict;
use warnings;
use base 'DBIx::Class::Core';
=head1 TABLE: C<article_requests>
=cut
__PACKAGE__->table("article_requests");
=head1 ACCESSORS
=head2 id
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 borrowernumber
data_type: 'integer'
is_foreign_key: 1
is_nullable: 0
=head2 biblionumber
data_type: 'integer'
is_foreign_key: 1
is_nullable: 0
=head2 itemnumber
data_type: 'integer'
is_foreign_key: 1
is_nullable: 1
=head2 branchcode
data_type: 'varchar'
is_foreign_key: 1
is_nullable: 1
size: 10
=head2 title
data_type: 'text'
is_nullable: 1
=head2 author
data_type: 'text'
is_nullable: 1
=head2 volume
data_type: 'text'
is_nullable: 1
=head2 issue
data_type: 'text'
is_nullable: 1
=head2 date
data_type: 'text'
is_nullable: 1
=head2 pages
data_type: 'text'
is_nullable: 1
=head2 chapters
data_type: 'text'
is_nullable: 1
=head2 patron_notes
data_type: 'text'
is_nullable: 1
=head2 status
data_type: 'enum'
default_value: 'PENDING'
extra: {list => ["PENDING","PROCESSING","COMPLETED","CANCELED"]}
is_nullable: 0
=head2 notes
data_type: 'text'
is_nullable: 1
=head2 created_on
data_type: 'timestamp'
datetime_undef_if_invalid: 1
default_value: current_timestamp
is_nullable: 0
=head2 updated_on
data_type: 'timestamp'
datetime_undef_if_invalid: 1
is_nullable: 1
=cut
__PACKAGE__->add_columns(
"id",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"borrowernumber",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
"biblionumber",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
"itemnumber",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
"branchcode",
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
"title",
{ data_type => "text", is_nullable => 1 },
"author",
{ data_type => "text", is_nullable => 1 },
"volume",
{ data_type => "text", is_nullable => 1 },
"issue",
{ data_type => "text", is_nullable => 1 },
"date",
{ data_type => "text", is_nullable => 1 },
"pages",
{ data_type => "text", is_nullable => 1 },
"chapters",
{ data_type => "text", is_nullable => 1 },
"patron_notes",
{ data_type => "text", is_nullable => 1 },
"status",
{
data_type => "enum",
default_value => "PENDING",
extra => { list => ["PENDING", "PROCESSING", "COMPLETED", "CANCELED"] },
is_nullable => 0,
},
"notes",
{ data_type => "text", is_nullable => 1 },
"created_on",
{
data_type => "timestamp",
datetime_undef_if_invalid => 1,
default_value => \"current_timestamp",
is_nullable => 0,
},
"updated_on",
{
data_type => "timestamp",
datetime_undef_if_invalid => 1,
is_nullable => 1,
},
);
=head1 PRIMARY KEY
=over 4
=item * L</id>
=back
=cut
__PACKAGE__->set_primary_key("id");
=head1 RELATIONS
=head2 biblionumber
Type: belongs_to
Related object: L<Koha::Schema::Result::Biblio>
=cut
__PACKAGE__->belongs_to(
"biblionumber",
"Koha::Schema::Result::Biblio",
{ biblionumber => "biblionumber" },
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);
=head2 borrowernumber
Type: belongs_to
Related object: L<Koha::Schema::Result::Borrower>
=cut
__PACKAGE__->belongs_to(
"borrowernumber",
"Koha::Schema::Result::Borrower",
{ borrowernumber => "borrowernumber" },
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);
=head2 branchcode
Type: belongs_to
Related object: L<Koha::Schema::Result::Branch>
=cut
__PACKAGE__->belongs_to(
"branchcode",
"Koha::Schema::Result::Branch",
{ branchcode => "branchcode" },
{
is_deferrable => 1,
join_type => "LEFT",
on_delete => "SET NULL",
on_update => "CASCADE",
},
);
=head2 itemnumber
Type: belongs_to
Related object: L<Koha::Schema::Result::Item>
=cut
__PACKAGE__->belongs_to(
"itemnumber",
"Koha::Schema::Result::Item",
{ itemnumber => "itemnumber" },
{
is_deferrable => 1,
join_type => "LEFT",
on_delete => "SET NULL",
on_update => "CASCADE",
},
);
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-05-25 13:08:54
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UcnwdgEHzMcmRY6vP9B61A
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;

View file

@ -152,6 +152,21 @@ __PACKAGE__->has_many(
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 article_requests
Type: has_many
Related object: L<Koha::Schema::Result::ArticleRequest>
=cut
__PACKAGE__->has_many(
"article_requests",
"Koha::Schema::Result::ArticleRequest",
{ "foreign.biblionumber" => "self.biblionumber" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 biblioimages
Type: has_many
@ -318,7 +333,7 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-05-03 18:29:15
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NK+HRwn4BhRKwuIfuFqHpA
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-24 13:56:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IC5u5De1u1DS26kQQ7xmUQ
1;

View file

@ -733,6 +733,21 @@ __PACKAGE__->has_many(
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 article_requests
Type: has_many
Related object: L<Koha::Schema::Result::ArticleRequest>
=cut
__PACKAGE__->has_many(
"article_requests",
"Koha::Schema::Result::ArticleRequest",
{ "foreign.borrowernumber" => "self.borrowernumber" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 borrower_attributes
Type: has_many
@ -1304,8 +1319,8 @@ Composing rels: L</aqorder_users> -> ordernumber
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-21 18:19:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rbkXombY7fZnZJ3CvHruUA
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-24 13:56:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3x6ma9Zw8B5BOg89weoy8g
__PACKAGE__->belongs_to(
"guarantor",

View file

@ -202,6 +202,21 @@ __PACKAGE__->has_many(
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 article_requests
Type: has_many
Related object: L<Koha::Schema::Result::ArticleRequest>
=cut
__PACKAGE__->has_many(
"article_requests",
"Koha::Schema::Result::ArticleRequest",
{ "foreign.branchcode" => "self.branchcode" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 authorised_values_branches
Type: has_many
@ -528,8 +543,8 @@ Composing rels: L</branchrelations> -> categorycode
__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2014-11-26 11:08:29
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FjNI9OEpa5OKfwwCkggu0w
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-24 13:56:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/9YwsU+GXK+fzc6IX2Tj5g
# You can replace this text with custom code or comments, and it will be preserved on regeneration

View file

@ -197,6 +197,13 @@ __PACKAGE__->table("issuingrules");
is_nullable: 0
size: 1
=head2 article_requests
data_type: 'enum'
default_value: 'no'
extra: {list => ["no","yes","bib_only","item_only"]}
is_nullable: 0
=cut
__PACKAGE__->add_columns(
@ -265,6 +272,13 @@ __PACKAGE__->add_columns(
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
"opacitemholds",
{ data_type => "char", default_value => "N", is_nullable => 0, size => 1 },
"article_requests",
{
data_type => "enum",
default_value => "no",
extra => { list => ["no", "yes", "bib_only", "item_only"] },
is_nullable => 0,
},
);
=head1 PRIMARY KEY
@ -284,8 +298,8 @@ __PACKAGE__->add_columns(
__PACKAGE__->set_primary_key("branchcode", "categorycode", "itemtype");
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-09-06 09:35:36
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HkvNR2YHTkqN2PnQk5XGAA
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-24 13:56:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eUHth1uaatT2fzY2bihv3g
# You can replace this text with custom code or comments, and it will be preserved on regeneration

View file

@ -439,6 +439,21 @@ __PACKAGE__->has_many(
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 article_requests
Type: has_many
Related object: L<Koha::Schema::Result::ArticleRequest>
=cut
__PACKAGE__->has_many(
"article_requests",
"Koha::Schema::Result::ArticleRequest",
{ "foreign.itemnumber" => "self.itemnumber" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 biblioitemnumber
Type: belongs_to
@ -660,8 +675,8 @@ __PACKAGE__->might_have(
);
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-05-03 18:29:16
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2XK/xYWHqauPzYKJcKc0ig
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-24 13:56:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Vf1sBZrpUo0Cvi896fjNuA
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );