Bugzilla – Attachment 56089 Details for
Bug 14610
Add ability to place article requests in Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14610 - Update Schema files
Bug-14610---Update-Schema-files.patch (text/plain), 11.32 KB, created by
Kyle M Hall (khall)
on 2016-10-10 09:11:45 UTC
(
hide
)
Description:
Bug 14610 - Update Schema files
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-10-10 09:11:45 UTC
Size:
11.32 KB
patch
obsolete
>From 2340860ca36bee2a7c16431b3f1b1613dcab735c Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 30 Oct 2015 11:59:30 -0400 >Subject: [PATCH] Bug 14610 - Update Schema files > >--- > Koha/Schema/Result/ArticleRequest.pm | 265 +++++++++++++++++++++++++++++++++++ > Koha/Schema/Result/Biblio.pm | 21 ++- > Koha/Schema/Result/Borrower.pm | 19 ++- > Koha/Schema/Result/Branch.pm | 19 ++- > Koha/Schema/Result/Issuingrule.pm | 18 ++- > Koha/Schema/Result/Item.pm | 19 ++- > 6 files changed, 351 insertions(+), 10 deletions(-) > create mode 100644 Koha/Schema/Result/ArticleRequest.pm > >diff --git a/Koha/Schema/Result/ArticleRequest.pm b/Koha/Schema/Result/ArticleRequest.pm >new file mode 100644 >index 0000000..0cc7ccc >--- /dev/null >+++ b/Koha/Schema/Result/ArticleRequest.pm >@@ -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; >diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm >index 84aae61..b646eb1 100644 >--- a/Koha/Schema/Result/Biblio.pm >+++ b/Koha/Schema/Result/Biblio.pm >@@ -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,9 @@ __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-05-16 11:05:47 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZYfUZwjwAevXsoXC09/nCw >+ > >+# You can replace this text with custom code or comments, and it will be preserved on regeneration > 1; >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index 8512753..1036509 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -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 >@@ -1244,8 +1259,8 @@ Composing rels: L</aqorder_users> -> ordernumber > __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-09-13 17:32:29 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:23Yg0CXG1z8f5Bx92JCVoQ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-09-14 12:41:22 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KJTY0zqaTzNSy24aIWKsOQ > > __PACKAGE__->belongs_to( > "guarantor", >diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm >index 9d84ab9..c59e00f 100644 >--- a/Koha/Schema/Result/Branch.pm >+++ b/Koha/Schema/Result/Branch.pm >@@ -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-05-16 11:06:59 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jJLwflVN3JdCuT1Libd+ww > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Issuingrule.pm b/Koha/Schema/Result/Issuingrule.pm >index 1ed60a9..e65c7b5 100644 >--- a/Koha/Schema/Result/Issuingrule.pm >+++ b/Koha/Schema/Result/Issuingrule.pm >@@ -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-09-14 12:41:22 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bI2eCZeSs607VtMR/Y6+Dg > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm >index ba49ded..d41933e 100644 >--- a/Koha/Schema/Result/Item.pm >+++ b/Koha/Schema/Result/Item.pm >@@ -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-05-16 11:07:58 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xAB1I3P45Di0jHHkbyKHng > > __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14610
:
42822
|
42823
|
42824
|
42825
|
42826
|
42827
|
42828
|
42829
|
43198
|
43199
|
43200
|
43201
|
43202
|
43264
|
43265
|
43266
|
43267
|
43268
|
43270
|
43271
|
43272
|
43273
|
43274
|
43278
|
43279
|
43280
|
43281
|
43282
|
43654
|
43655
|
43656
|
43657
|
43658
|
44219
|
44220
|
44221
|
44222
|
44223
|
44224
|
44225
|
44226
|
44227
|
44228
|
44229
|
44230
|
44231
|
44232
|
44233
|
44234
|
44235
|
44236
|
44237
|
44238
|
44239
|
44240
|
44241
|
44242
|
44916
|
44917
|
44918
|
44919
|
44920
|
44921
|
44922
|
44923
|
44924
|
44925
|
44926
|
45946
|
45947
|
45948
|
45949
|
45950
|
45951
|
45952
|
45953
|
45954
|
45955
|
45956
|
46518
|
46519
|
46520
|
46521
|
46522
|
46523
|
46524
|
46525
|
46526
|
46527
|
46528
|
46529
|
46530
|
46595
|
46596
|
46597
|
46598
|
46599
|
46600
|
46601
|
46602
|
46603
|
46604
|
46605
|
46606
|
46607
|
46608
|
46609
|
46610
|
46611
|
46612
|
47905
|
47906
|
47907
|
47908
|
47909
|
47910
|
47911
|
47912
|
47913
|
47914
|
47915
|
47916
|
47917
|
47918
|
47919
|
47920
|
47921
|
47922
|
48177
|
48178
|
48179
|
48180
|
48181
|
48182
|
48212
|
48213
|
48214
|
48215
|
48216
|
48217
|
48218
|
50348
|
50349
|
50350
|
50351
|
50352
|
50353
|
50354
|
51527
|
51528
|
51529
|
51530
|
51531
|
51532
|
51533
|
51534
|
51778
|
51779
|
51780
|
51781
|
51782
|
51783
|
52688
|
52689
|
52690
|
52691
|
52692
|
52693
|
55556
|
55557
|
55558
|
55559
|
55560
|
55561
|
55568
|
55569
|
56084
|
56085
|
56086
|
56087
|
56088
|
56089
|
56090
|
56318
|
56319
|
56320
|
56321
|
56322
|
56323
|
56324
|
56325
|
56326
|
56327
|
56328
|
56775
|
56776
|
56777
|
56778
|
56779
|
56780
|
56781
|
56782
|
56783
|
56784
|
56785
|
56816
|
56854
|
56855
|
56856
|
56857
|
56858
|
56859
|
56860
|
56861
|
56862
|
56863
|
56864
|
56865