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

(-)a/Koha/Schema/Result/BorrowerAttributeType.pm (-2 / +25 lines)
Lines 90-95 __PACKAGE__->table("borrower_attribute_types"); Link Here
90
  is_nullable: 0
90
  is_nullable: 0
91
  size: 255
91
  size: 255
92
92
93
=head2 keep_for_pseudonymization
94
95
  data_type: 'tinyint'
96
  default_value: 0
97
  is_nullable: 0
98
93
=cut
99
=cut
94
100
95
__PACKAGE__->add_columns(
101
__PACKAGE__->add_columns(
Lines 115-120 __PACKAGE__->add_columns( Link Here
115
  { data_type => "varchar", is_nullable => 1, size => 10 },
121
  { data_type => "varchar", is_nullable => 1, size => 10 },
116
  "class",
122
  "class",
117
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
123
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
124
  "keep_for_pseudonymization",
125
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
118
);
126
);
119
127
120
=head1 PRIMARY KEY
128
=head1 PRIMARY KEY
Lines 161-169 __PACKAGE__->has_many( Link Here
161
  { cascade_copy => 0, cascade_delete => 0 },
169
  { cascade_copy => 0, cascade_delete => 0 },
162
);
170
);
163
171
172
=head2 pseudonymized_borrower_attributes
173
174
Type: has_many
175
176
Related object: L<Koha::Schema::Result::PseudonymizedBorrowerAttribute>
177
178
=cut
179
180
__PACKAGE__->has_many(
181
  "pseudonymized_borrower_attributes",
182
  "Koha::Schema::Result::PseudonymizedBorrowerAttribute",
183
  { "foreign.code" => "self.code" },
184
  { cascade_copy => 0, cascade_delete => 0 },
185
);
186
164
187
165
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-25 20:32:12
188
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-01-11 18:00:12
166
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gsPR8PuUUZHFUkr3MIbTpw
189
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MMozmna9C3PseXF0Qskznw
167
190
168
__PACKAGE__->add_columns(
191
__PACKAGE__->add_columns(
169
    '+keep_for_pseudonymization' => { is_boolean => 1 },
192
    '+keep_for_pseudonymization' => { is_boolean => 1 },
(-)a/Koha/Schema/Result/PseudonymizedBorrowerAttribute.pm (+114 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::PseudonymizedBorrowerAttribute;
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::PseudonymizedBorrowerAttribute
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<pseudonymized_borrower_attributes>
19
20
=cut
21
22
__PACKAGE__->table("pseudonymized_borrower_attributes");
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 transaction_id
33
34
  data_type: 'integer'
35
  is_foreign_key: 1
36
  is_nullable: 0
37
38
=head2 code
39
40
  data_type: 'varchar'
41
  is_foreign_key: 1
42
  is_nullable: 0
43
  size: 10
44
45
=head2 attribute
46
47
  data_type: 'varchar'
48
  is_nullable: 1
49
  size: 255
50
51
=cut
52
53
__PACKAGE__->add_columns(
54
  "id",
55
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
56
  "transaction_id",
57
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
58
  "code",
59
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
60
  "attribute",
61
  { data_type => "varchar", is_nullable => 1, size => 255 },
62
);
63
64
=head1 PRIMARY KEY
65
66
=over 4
67
68
=item * L</id>
69
70
=back
71
72
=cut
73
74
__PACKAGE__->set_primary_key("id");
75
76
=head1 RELATIONS
77
78
=head2 code
79
80
Type: belongs_to
81
82
Related object: L<Koha::Schema::Result::BorrowerAttributeType>
83
84
=cut
85
86
__PACKAGE__->belongs_to(
87
  "code",
88
  "Koha::Schema::Result::BorrowerAttributeType",
89
  { code => "code" },
90
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
91
);
92
93
=head2 transaction
94
95
Type: belongs_to
96
97
Related object: L<Koha::Schema::Result::PseudonymizedTransaction>
98
99
=cut
100
101
__PACKAGE__->belongs_to(
102
  "transaction",
103
  "Koha::Schema::Result::PseudonymizedTransaction",
104
  { id => "transaction_id" },
105
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
106
);
107
108
109
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-01-11 17:12:17
110
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:q6CTb8kq83p1bEM+ilfAww
111
112
113
# You can replace this text with custom code or comments, and it will be preserved on regeneration
114
1;
(-)a/Koha/Schema/Result/PseudonymizedTransaction.pm (-3 / +17 lines)
Lines 272-277 __PACKAGE__->belongs_to( Link Here
272
  { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
272
  { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
273
);
273
);
274
274
275
=head2 pseudonymized_borrower_attributes
276
277
Type: has_many
278
279
Related object: L<Koha::Schema::Result::PseudonymizedBorrowerAttribute>
280
281
=cut
282
283
__PACKAGE__->has_many(
284
  "pseudonymized_borrower_attributes",
285
  "Koha::Schema::Result::PseudonymizedBorrowerAttribute",
286
  { "foreign.transaction_id" => "self.id" },
287
  { cascade_copy => 0, cascade_delete => 0 },
288
);
289
275
=head2 transaction_branchcode
290
=head2 transaction_branchcode
276
291
277
Type: belongs_to
292
Type: belongs_to
Lines 293-300 __PACKAGE__->belongs_to( Link Here
293
);
308
);
294
309
295
310
296
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-01-11 16:08:51
311
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-01-11 17:12:17
297
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:r3YdoQ6TKEF0THmeXHvRwA
312
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bzHjcKCHYf+bixeA1dhKIQ
298
313
299
314
300
# You can replace this text with custom code or comments, and it will be preserved on regeneration
315
# You can replace this text with custom code or comments, and it will be preserved on regeneration
301
- 

Return to bug 24151