Bugzilla – Attachment 60766 Details for
Bug 15707
Add ability to define hierarchical groups of libraries
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15707 - Update Schema Files
Bug-15707---Update-Schema-Files.patch (text/plain), 4.71 KB, created by
Kyle M Hall (khall)
on 2017-03-01 14:03:09 UTC
(
hide
)
Description:
Bug 15707 - Update Schema Files
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2017-03-01 14:03:09 UTC
Size:
4.71 KB
patch
obsolete
>From 131ce01f1bc19ab132d5e13c5020711ebe9ca405 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 2 Nov 2016 13:24:44 +0000 >Subject: [PATCH] Bug 15707 - Update Schema Files > >--- > Koha/Schema/Result/Branch.pm | 19 ++++- > Koha/Schema/Result/LibraryGroup.pm | 170 +++++++++++++++++++++++++++++++++++++ > 2 files changed, 187 insertions(+), 2 deletions(-) > create mode 100644 Koha/Schema/Result/LibraryGroup.pm > >diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm >index ec44cde..65f263a 100644 >--- a/Koha/Schema/Result/Branch.pm >+++ b/Koha/Schema/Result/Branch.pm >@@ -472,6 +472,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 library_groups >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::LibraryGroup> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "library_groups", >+ "Koha::Schema::Result::LibraryGroup", >+ { "foreign.branchcode" => "self.branchcode" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 opac_news > > Type: has_many >@@ -543,8 +558,8 @@ Composing rels: L</branchrelations> -> categorycode > __PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode"); > > >-# 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 >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-11-02 13:23:16 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/kNNkq3bkqqg3fzTuYekFQ > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/LibraryGroup.pm b/Koha/Schema/Result/LibraryGroup.pm >new file mode 100644 >index 0000000..5811d7c >--- /dev/null >+++ b/Koha/Schema/Result/LibraryGroup.pm >@@ -0,0 +1,170 @@ >+use utf8; >+package Koha::Schema::Result::LibraryGroup; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::LibraryGroup >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<library_groups> >+ >+=cut >+ >+__PACKAGE__->table("library_groups"); >+ >+=head1 ACCESSORS >+ >+=head2 id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 parent_id >+ >+ 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: 'varchar' >+ is_nullable: 1 >+ size: 100 >+ >+=head2 description >+ >+ data_type: 'text' >+ is_nullable: 1 >+ >+=head2 created_on >+ >+ data_type: 'datetime' >+ datetime_undef_if_invalid: 1 >+ is_nullable: 0 >+ >+=head2 updated_on >+ >+ data_type: 'datetime' >+ datetime_undef_if_invalid: 1 >+ is_nullable: 1 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "parent_id", >+ { 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 => "varchar", is_nullable => 1, size => 100 }, >+ "description", >+ { data_type => "text", is_nullable => 1 }, >+ "created_on", >+ { >+ data_type => "datetime", >+ datetime_undef_if_invalid => 1, >+ is_nullable => 0, >+ }, >+ "updated_on", >+ { >+ data_type => "datetime", >+ 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 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 => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ >+=head2 library_groups >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::LibraryGroup> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "library_groups", >+ "Koha::Schema::Result::LibraryGroup", >+ { "foreign.parent_id" => "self.id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+=head2 parent >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::LibraryGroup> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "parent", >+ "Koha::Schema::Result::LibraryGroup", >+ { id => "parent_id" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-11-02 13:23:16 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aQJgATq8JW4hCBFZfYus7w >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >-- >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 15707
:
47479
|
47480
|
47481
|
47482
|
47483
|
47484
|
47728
|
47729
|
47730
|
47731
|
47732
|
47733
|
47734
|
47849
|
47850
|
47851
|
47852
|
47853
|
47854
|
47855
|
47868
|
47869
|
47870
|
47871
|
47872
|
47873
|
47874
|
48072
|
50400
|
50401
|
50402
|
50403
|
50404
|
50405
|
50406
|
50407
|
50408
|
52267
|
52268
|
52269
|
52270
|
52271
|
52272
|
52273
|
52274
|
52275
|
52367
|
52370
|
52562
|
52563
|
52564
|
52565
|
52566
|
52567
|
52568
|
52569
|
52570
|
52571
|
52572
|
52573
|
52574
|
52575
|
57080
|
57081
|
57082
|
57083
|
57084
|
57085
|
57086
|
57087
|
57088
|
57089
|
57090
|
57091
|
57092
|
57093
|
58086
|
60504
|
60505
|
60506
|
60507
|
60508
|
60509
|
60510
|
60511
|
60512
|
60513
|
60514
|
60515
|
60516
|
60517
|
60518
|
60572
|
60573
|
60574
|
60575
|
60576
|
60577
|
60578
|
60579
|
60580
|
60581
|
60582
|
60583
|
60584
|
60585
|
60586
|
60587
|
60755
|
60756
|
60757
|
60758
|
60759
|
60760
|
60761
|
60762
|
60763
|
60764
|
60765
|
60766
|
60767
|
60768
|
60769
|
60770
|
60771
|
65666
|
65667
|
65668
|
65669
|
65670
|
65671
|
65672
|
65673
|
65674
|
65675
|
65676
|
65677
|
65678
|
65679
|
65680
|
65681
|
69514
|
69515
|
69516
|
69517
|
69518
|
69519
|
69520
|
69521
|
69522
|
69523
|
69524
|
69525
|
69526
|
69527
|
69528
|
69529
|
69573
|
69574
|
69575
|
69576
|
69577
|
69578
|
69579
|
69580
|
69581
|
69582
|
69583
|
69584
|
69585
|
69586
|
69587
|
69588
|
69589