Bugzilla – Attachment 77208 Details for
Bug 18887
Introduce new table 'circulation_rules', use for 'max_holds' rules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18887: Add new schema file
Bug-18887-Add-new-schema-file.patch (text/plain), 3.72 KB, created by
Jonathan Druart
on 2018-07-24 12:06:53 UTC
(
hide
)
Description:
Bug 18887: Add new schema file
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-07-24 12:06:53 UTC
Size:
3.72 KB
patch
obsolete
>From 9ca730f05ca14820237f41350535aad28cbc7858 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 6 Mar 2017 18:03:19 +0000 >Subject: [PATCH] Bug 18887: Add new schema file > >--- > Koha/Schema/Result/CirculationRule.pm | 180 ++++++++++++++++++++++++++++++++++ > 1 file changed, 180 insertions(+) > create mode 100644 Koha/Schema/Result/CirculationRule.pm > >diff --git a/Koha/Schema/Result/CirculationRule.pm b/Koha/Schema/Result/CirculationRule.pm >new file mode 100644 >index 0000000000..9c950cdb5f >--- /dev/null >+++ b/Koha/Schema/Result/CirculationRule.pm >@@ -0,0 +1,180 @@ >+use utf8; >+package Koha::Schema::Result::CirculationRule; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::CirculationRule >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<circulation_rules> >+ >+=cut >+ >+__PACKAGE__->table("circulation_rules"); >+ >+=head1 ACCESSORS >+ >+=head2 id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 branchcode >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ size: 10 >+ >+=head2 categorycode >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ size: 10 >+ >+=head2 itemtype >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ size: 10 >+ >+=head2 rule_name >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 32 >+ >+=head2 rule_value >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 32 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "branchcode", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, >+ "categorycode", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, >+ "itemtype", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, >+ "rule_name", >+ { data_type => "varchar", is_nullable => 0, size => 32 }, >+ "rule_value", >+ { data_type => "varchar", is_nullable => 0, size => 32 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("id"); >+ >+=head1 UNIQUE CONSTRAINTS >+ >+=head2 C<branchcode_2> >+ >+=over 4 >+ >+=item * L</branchcode> >+ >+=item * L</categorycode> >+ >+=item * L</itemtype> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->add_unique_constraint("branchcode_2", ["branchcode", "categorycode", "itemtype"]); >+ >+=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 categorycode >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Branchcategory> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "categorycode", >+ "Koha::Schema::Result::Branchcategory", >+ { categorycode => "categorycode" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ >+=head2 itemtype >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Itemtype> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "itemtype", >+ "Koha::Schema::Result::Itemtype", >+ { itemtype => "itemtype" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-03-06 17:39:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SZuAUJSu+FICBAxyxIcJQA >+ >+ >+# 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 18887
:
65233
|
65234
|
65235
|
65236
|
65237
|
67620
|
70986
|
70987
|
70988
|
70989
|
70990
|
70991
|
71031
|
71042
|
72218
|
72219
|
72220
|
72221
|
72222
|
72223
|
72224
|
77080
|
77081
|
77082
|
77083
|
77084
|
77085
|
77086
|
77087
|
77207
|
77208
|
77209
|
77210
|
77211
|
77212
|
77213
|
77214
|
77215
|
77218
|
77238
|
77649
|
77650
|
77651
|
77652
|
77653
|
77654
|
77655
|
77656
|
77657
|
77658
|
77659
|
78346
|
78347
|
78348
|
78349
|
78350
|
78351
|
78352
|
78353
|
78354
|
78355
|
78356
|
78674
|
78675
|
78676
|
78677
|
78678
|
78679
|
78680
|
78681
|
78682
|
78683
|
78684
|
78743
|
78744
|
78745
|
78746
|
78747
|
78748
|
78749
|
78750
|
78751
|
78752
|
78753
|
78879
|
79119
|
79626
|
79627
|
79628
|
79629
|
79630
|
79631
|
79632
|
79633
|
79634
|
79635
|
79636
|
79637
|
79638
|
79639
|
79640
|
79641
|
79761
|
79762
|
79763
|
79764
|
79765
|
79766
|
79767
|
79768
|
79769
|
79770
|
79771
|
79772
|
79773
|
79774
|
79775
|
79776
|
79778
|
79891