Bugzilla – Attachment 81628 Details for
Bug 15836
Labels: Offer configuration option for splitting call numbers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15836: DBIC Schema change
Bug-15836-DBIC-Schema-change.patch (text/plain), 5.02 KB, created by
Jonathan Druart
on 2018-10-30 15:55:39 UTC
(
hide
)
Description:
Bug 15836: DBIC Schema change
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-10-30 15:55:39 UTC
Size:
5.02 KB
patch
obsolete
>From 128e62f6b2cb91478039ea97ff85b9b7ae450b58 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 21 Jun 2018 12:57:22 -0300 >Subject: [PATCH] Bug 15836: DBIC Schema change >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Sponsored-by: Goethe-Institut > >Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de> >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > Koha/Schema/Result/ClassSortRule.pm | 4 +- > Koha/Schema/Result/ClassSource.pm | 35 +++++++++++- > Koha/Schema/Result/ClassSplitRule.pm | 100 +++++++++++++++++++++++++++++++++++ > 3 files changed, 135 insertions(+), 4 deletions(-) > create mode 100644 Koha/Schema/Result/ClassSplitRule.pm > >diff --git a/Koha/Schema/Result/ClassSortRule.pm b/Koha/Schema/Result/ClassSortRule.pm >index 14f8220202..4307a81bb0 100644 >--- a/Koha/Schema/Result/ClassSortRule.pm >+++ b/Koha/Schema/Result/ClassSortRule.pm >@@ -83,8 +83,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HvJeH/EdCoaiMvCyFLKr+A >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-06-21 18:57:48 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hhKFCZRLaQ0+UXUB3Q3xNQ > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/ClassSource.pm b/Koha/Schema/Result/ClassSource.pm >index 6c7a4413d5..b7b0b6bf46 100644 >--- a/Koha/Schema/Result/ClassSource.pm >+++ b/Koha/Schema/Result/ClassSource.pm >@@ -49,6 +49,14 @@ __PACKAGE__->table("class_sources"); > is_nullable: 0 > size: 10 > >+=head2 class_split_rule >+ >+ data_type: 'varchar' >+ default_value: (empty string) >+ is_foreign_key: 1 >+ is_nullable: 0 >+ size: 10 >+ > =cut > > __PACKAGE__->add_columns( >@@ -66,6 +74,14 @@ __PACKAGE__->add_columns( > is_nullable => 0, > size => 10, > }, >+ "class_split_rule", >+ { >+ data_type => "varchar", >+ default_value => "", >+ is_foreign_key => 1, >+ is_nullable => 0, >+ size => 10, >+ }, > ); > > =head1 PRIMARY KEY >@@ -97,9 +113,24 @@ __PACKAGE__->belongs_to( > { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, > ); > >+=head2 class_split_rule >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::ClassSplitRule> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "class_split_rule", >+ "Koha::Schema::Result::ClassSplitRule", >+ { class_split_rule => "class_split_rule" }, >+ { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, >+); >+ > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tu9NZrk0s8VBgtc1kNpXgg >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-06-21 18:57:48 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ybmbZUFpnCnbdxaqQcrRbw > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/ClassSplitRule.pm b/Koha/Schema/Result/ClassSplitRule.pm >new file mode 100644 >index 0000000000..613059e672 >--- /dev/null >+++ b/Koha/Schema/Result/ClassSplitRule.pm >@@ -0,0 +1,100 @@ >+use utf8; >+package Koha::Schema::Result::ClassSplitRule; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::ClassSplitRule >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<class_split_rules> >+ >+=cut >+ >+__PACKAGE__->table("class_split_rules"); >+ >+=head1 ACCESSORS >+ >+=head2 class_split_rule >+ >+ data_type: 'varchar' >+ default_value: (empty string) >+ is_nullable: 0 >+ size: 10 >+ >+=head2 description >+ >+ data_type: 'longtext' >+ is_nullable: 1 >+ >+=head2 split_routine >+ >+ data_type: 'varchar' >+ default_value: (empty string) >+ is_nullable: 0 >+ size: 30 >+ >+=head2 split_regex >+ >+ data_type: 'varchar' >+ default_value: (empty string) >+ is_nullable: 0 >+ size: 255 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "class_split_rule", >+ { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, >+ "description", >+ { data_type => "longtext", is_nullable => 1 }, >+ "split_routine", >+ { data_type => "varchar", default_value => "", is_nullable => 0, size => 30 }, >+ "split_regex", >+ { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</class_split_rule> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("class_split_rule"); >+ >+=head1 RELATIONS >+ >+=head2 class_sources >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::ClassSource> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "class_sources", >+ "Koha::Schema::Result::ClassSource", >+ { "foreign.class_split_rule" => "self.class_split_rule" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-06-21 18:57:48 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LSmwnmG/E4Qb6xi2MqceBg >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >-- >2.11.0
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 15836
:
76691
|
76692
|
76693
|
76694
|
76695
|
76696
|
77061
|
77079
|
77306
|
78791
|
78793
|
78795
|
78796
|
78798
|
78799
|
79029
|
80339
|
80340
|
80341
|
80342
|
80343
|
80344
|
80345
|
80346
|
80347
|
80548
|
80549
|
80550
|
80551
|
80552
|
80553
|
80554
|
80555
|
80556
|
81033
|
81034
|
81035
|
81036
|
81037
|
81038
|
81039
|
81040
|
81041
|
81627
|
81628
|
81629
|
81630
|
81631
|
81632
|
81633
|
81634
|
81635
|
82110
|
82112
|
82113
|
82118
|
82119
|
82120
|
82289
|
82290
|
82291
|
82292
|
82293
|
82294
|
82295
|
82296
|
82297
|
82298
|
82299
|
82300
|
82301
|
82302
|
82317
|
82318
|
82319
|
82321