Bugzilla – Attachment 112551 Details for
Bug 9525
Add option to define float groups and rules for float
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9525: Schema changes - DO NOT PUSH
0002-Bug-9525-Schema-changes-DO-NOT-PUSH.patch (text/plain), 4.23 KB, created by
Emmi Takkinen
on 2020-10-27 10:58:55 UTC
(
hide
)
Description:
Bug 9525: Schema changes - DO NOT PUSH
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2020-10-27 10:58:55 UTC
Size:
4.23 KB
patch
obsolete
>From dc41456f409d25236438cd21983bce92138af136 Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@outlook.com> >Date: Tue, 28 Apr 2020 09:47:52 +0300 >Subject: [PATCH 2/4] Bug 9525: Schema changes - DO NOT PUSH > >--- > Koha/Schema/Result/Branch.pm | 30 ++++++ > Koha/Schema/Result/FloatingMatrix.pm | 145 +++++++++++++++++++++++++++ > 2 files changed, 175 insertions(+) > create mode 100644 Koha/Schema/Result/FloatingMatrix.pm > >diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm >index 892e0c2448..606aee6f3d 100644 >--- a/Koha/Schema/Result/Branch.pm >+++ b/Koha/Schema/Result/Branch.pm >@@ -563,6 +563,36 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 floating_matrixes_from_branch >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::FloatingMatrix> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "floating_matrixes_from_branch", >+ "Koha::Schema::Result::FloatingMatrix", >+ { "foreign.from_branch" => "self.branchcode" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+=head2 floating_matrixes_to_branch >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::FloatingMatrix> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "floating_matrixes_to_branch", >+ "Koha::Schema::Result::FloatingMatrix", >+ { "foreign.to_branch" => "self.branchcode" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 hold_fill_targets > > Type: has_many >diff --git a/Koha/Schema/Result/FloatingMatrix.pm b/Koha/Schema/Result/FloatingMatrix.pm >new file mode 100644 >index 0000000000..26d273aab4 >--- /dev/null >+++ b/Koha/Schema/Result/FloatingMatrix.pm >@@ -0,0 +1,145 @@ >+use utf8; >+package Koha::Schema::Result::FloatingMatrix; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::FloatingMatrix >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<floating_matrix> >+ >+=cut >+ >+__PACKAGE__->table("floating_matrix"); >+ >+=head1 ACCESSORS >+ >+=head2 id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 from_branch >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ size: 10 >+ >+=head2 to_branch >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ size: 10 >+ >+=head2 floating >+ >+ data_type: 'enum' >+ default_value: 'ALWAYS' >+ extra: {list => ["ALWAYS","POSSIBLE","CONDITIONAL"]} >+ is_nullable: 0 >+ >+=head2 condition_rules >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 100 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "from_branch", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 }, >+ "to_branch", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 }, >+ "floating", >+ { >+ data_type => "enum", >+ default_value => "ALWAYS", >+ extra => { list => ["ALWAYS", "POSSIBLE", "CONDITIONAL"] }, >+ is_nullable => 0, >+ }, >+ "condition_rules", >+ { data_type => "varchar", is_nullable => 1, size => 100 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("id"); >+ >+=head1 UNIQUE CONSTRAINTS >+ >+=head2 C<floating_matrix_uniq_branches> >+ >+=over 4 >+ >+=item * L</from_branch> >+ >+=item * L</to_branch> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->add_unique_constraint("floating_matrix_uniq_branches", ["from_branch", "to_branch"]); >+ >+=head1 RELATIONS >+ >+=head2 from_branch >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Branch> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "from_branch", >+ "Koha::Schema::Result::Branch", >+ { branchcode => "from_branch" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+=head2 to_branch >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Branch> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "to_branch", >+ "Koha::Schema::Result::Branch", >+ { branchcode => "to_branch" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-03-10 09:28:20 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jOVU1Wag0o96NkjrnPjsvg >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >-- >2.17.1 >
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 9525
:
40077
|
40102
|
40103
|
44754
|
44756
|
44760
|
48310
|
100420
|
100421
|
100422
|
100741
|
100742
|
100743
|
103828
|
103829
|
103830
|
103831
|
112550
|
112551
|
112552
|
112553
|
124825
|
124826
|
124827
|
133071
|
133072
|
133073
|
139024
|
139025
|
139026
|
143740
|
143741
|
143742
|
143743
|
150241
|
150242
|
150243
|
150244
|
150245
|
150246
|
156330
|
156331
|
156332
|
156333
|
156334
|
156335
|
156336