View | Details | Raw Unified | Return to bug 9525
Collapse All | Expand All

(-)a/Koha/Schema/Result/Branch.pm (+30 lines)
Lines 533-538 __PACKAGE__->has_many( Link Here
533
  { cascade_copy => 0, cascade_delete => 0 },
533
  { cascade_copy => 0, cascade_delete => 0 },
534
);
534
);
535
535
536
=head2 floating_matrixes_from_branch
537
538
Type: has_many
539
540
Related object: L<Koha::Schema::Result::FloatingMatrix>
541
542
=cut
543
544
__PACKAGE__->has_many(
545
  "floating_matrixes_from_branch",
546
  "Koha::Schema::Result::FloatingMatrix",
547
  { "foreign.from_branch" => "self.branchcode" },
548
  { cascade_copy => 0, cascade_delete => 0 },
549
);
550
551
=head2 floating_matrixes_to_branch
552
553
Type: has_many
554
555
Related object: L<Koha::Schema::Result::FloatingMatrix>
556
557
=cut
558
559
__PACKAGE__->has_many(
560
  "floating_matrixes_to_branch",
561
  "Koha::Schema::Result::FloatingMatrix",
562
  { "foreign.to_branch" => "self.branchcode" },
563
  { cascade_copy => 0, cascade_delete => 0 },
564
);
565
536
=head2 hold_fill_targets
566
=head2 hold_fill_targets
537
567
538
Type: has_many
568
Type: has_many
(-)a/Koha/Schema/Result/FloatingMatrix.pm (-1 / +145 lines)
Line 0 Link Here
0
- 
1
use utf8;
2
package Koha::Schema::Result::FloatingMatrix;
3
4
# Created by DBIx::Class::Schema::Loader
5
# DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7
=head1 NAME
8
9
Koha::Schema::Result::FloatingMatrix
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<floating_matrix>
19
20
=cut
21
22
__PACKAGE__->table("floating_matrix");
23
24
=head1 ACCESSORS
25
26
=head2 id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 from_branch
33
34
  data_type: 'varchar'
35
  is_foreign_key: 1
36
  is_nullable: 0
37
  size: 10
38
39
=head2 to_branch
40
41
  data_type: 'varchar'
42
  is_foreign_key: 1
43
  is_nullable: 0
44
  size: 10
45
46
=head2 floating
47
48
  data_type: 'enum'
49
  default_value: 'ALWAYS'
50
  extra: {list => ["ALWAYS","POSSIBLE","CONDITIONAL"]}
51
  is_nullable: 0
52
53
=head2 condition_rules
54
55
  data_type: 'varchar'
56
  is_nullable: 1
57
  size: 100
58
59
=cut
60
61
__PACKAGE__->add_columns(
62
  "id",
63
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
64
  "from_branch",
65
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
66
  "to_branch",
67
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
68
  "floating",
69
  {
70
    data_type => "enum",
71
    default_value => "ALWAYS",
72
    extra => { list => ["ALWAYS", "POSSIBLE", "CONDITIONAL"] },
73
    is_nullable => 0,
74
  },
75
  "condition_rules",
76
  { data_type => "varchar", is_nullable => 1, size => 100 },
77
);
78
79
=head1 PRIMARY KEY
80
81
=over 4
82
83
=item * L</id>
84
85
=back
86
87
=cut
88
89
__PACKAGE__->set_primary_key("id");
90
91
=head1 UNIQUE CONSTRAINTS
92
93
=head2 C<floating_matrix_uniq_branches>
94
95
=over 4
96
97
=item * L</from_branch>
98
99
=item * L</to_branch>
100
101
=back
102
103
=cut
104
105
__PACKAGE__->add_unique_constraint("floating_matrix_uniq_branches", ["from_branch", "to_branch"]);
106
107
=head1 RELATIONS
108
109
=head2 from_branch
110
111
Type: belongs_to
112
113
Related object: L<Koha::Schema::Result::Branch>
114
115
=cut
116
117
__PACKAGE__->belongs_to(
118
  "from_branch",
119
  "Koha::Schema::Result::Branch",
120
  { branchcode => "from_branch" },
121
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
122
);
123
124
=head2 to_branch
125
126
Type: belongs_to
127
128
Related object: L<Koha::Schema::Result::Branch>
129
130
=cut
131
132
__PACKAGE__->belongs_to(
133
  "to_branch",
134
  "Koha::Schema::Result::Branch",
135
  { branchcode => "to_branch" },
136
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
137
);
138
139
140
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-03-10 09:28:20
141
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jOVU1Wag0o96NkjrnPjsvg
142
143
144
# You can replace this text with custom code or comments, and it will be preserved on regeneration
145
1;

Return to bug 9525