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

(-)a/Koha/Schema/Result/AnonymizedBorrower.pm (+227 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::AnonymizedBorrower;
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::AnonymizedBorrower
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<anonymized_borrowers>
19
20
=cut
21
22
__PACKAGE__->table("anonymized_borrowers");
23
24
=head1 ACCESSORS
25
26
=head2 hashed_borrowernumber
27
28
  data_type: 'varchar'
29
  is_nullable: 0
30
  size: 60
31
32
=head2 has_cardnumber
33
34
  data_type: 'tinyint'
35
  default_value: 0
36
  is_nullable: 0
37
38
=head2 title
39
40
  data_type: 'longtext'
41
  is_nullable: 1
42
43
=head2 city
44
45
  data_type: 'longtext'
46
  is_nullable: 1
47
48
=head2 state
49
50
  data_type: 'mediumtext'
51
  is_nullable: 1
52
53
=head2 zipcode
54
55
  data_type: 'varchar'
56
  is_nullable: 1
57
  size: 25
58
59
=head2 country
60
61
  data_type: 'mediumtext'
62
  is_nullable: 1
63
64
=head2 branchcode
65
66
  data_type: 'varchar'
67
  default_value: (empty string)
68
  is_foreign_key: 1
69
  is_nullable: 0
70
  size: 10
71
72
=head2 categorycode
73
74
  data_type: 'varchar'
75
  default_value: (empty string)
76
  is_foreign_key: 1
77
  is_nullable: 0
78
  size: 10
79
80
=head2 dateenrolled
81
82
  data_type: 'date'
83
  datetime_undef_if_invalid: 1
84
  is_nullable: 1
85
86
=head2 sex
87
88
  data_type: 'varchar'
89
  is_nullable: 1
90
  size: 1
91
92
=head2 sort1
93
94
  data_type: 'varchar'
95
  is_nullable: 1
96
  size: 80
97
98
=head2 sort2
99
100
  data_type: 'varchar'
101
  is_nullable: 1
102
  size: 80
103
104
=cut
105
106
__PACKAGE__->add_columns(
107
  "hashed_borrowernumber",
108
  { data_type => "varchar", is_nullable => 0, size => 60 },
109
  "has_cardnumber",
110
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
111
  "title",
112
  { data_type => "longtext", is_nullable => 1 },
113
  "city",
114
  { data_type => "longtext", is_nullable => 1 },
115
  "state",
116
  { data_type => "mediumtext", is_nullable => 1 },
117
  "zipcode",
118
  { data_type => "varchar", is_nullable => 1, size => 25 },
119
  "country",
120
  { data_type => "mediumtext", is_nullable => 1 },
121
  "branchcode",
122
  {
123
    data_type => "varchar",
124
    default_value => "",
125
    is_foreign_key => 1,
126
    is_nullable => 0,
127
    size => 10,
128
  },
129
  "categorycode",
130
  {
131
    data_type => "varchar",
132
    default_value => "",
133
    is_foreign_key => 1,
134
    is_nullable => 0,
135
    size => 10,
136
  },
137
  "dateenrolled",
138
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
139
  "sex",
140
  { data_type => "varchar", is_nullable => 1, size => 1 },
141
  "sort1",
142
  { data_type => "varchar", is_nullable => 1, size => 80 },
143
  "sort2",
144
  { data_type => "varchar", is_nullable => 1, size => 80 },
145
);
146
147
=head1 PRIMARY KEY
148
149
=over 4
150
151
=item * L</hashed_borrowernumber>
152
153
=back
154
155
=cut
156
157
__PACKAGE__->set_primary_key("hashed_borrowernumber");
158
159
=head1 RELATIONS
160
161
=head2 anonymized_borrower_attributes
162
163
Type: has_many
164
165
Related object: L<Koha::Schema::Result::AnonymizedBorrowerAttribute>
166
167
=cut
168
169
__PACKAGE__->has_many(
170
  "anonymized_borrower_attributes",
171
  "Koha::Schema::Result::AnonymizedBorrowerAttribute",
172
  { "foreign.hashed_borrowernumber" => "self.hashed_borrowernumber" },
173
  { cascade_copy => 0, cascade_delete => 0 },
174
);
175
176
=head2 anonymized_transactions
177
178
Type: has_many
179
180
Related object: L<Koha::Schema::Result::AnonymizedTransaction>
181
182
=cut
183
184
__PACKAGE__->has_many(
185
  "anonymized_transactions",
186
  "Koha::Schema::Result::AnonymizedTransaction",
187
  { "foreign.hashed_borrowernumber" => "self.hashed_borrowernumber" },
188
  { cascade_copy => 0, cascade_delete => 0 },
189
);
190
191
=head2 branchcode
192
193
Type: belongs_to
194
195
Related object: L<Koha::Schema::Result::Branch>
196
197
=cut
198
199
__PACKAGE__->belongs_to(
200
  "branchcode",
201
  "Koha::Schema::Result::Branch",
202
  { branchcode => "branchcode" },
203
  { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
204
);
205
206
=head2 categorycode
207
208
Type: belongs_to
209
210
Related object: L<Koha::Schema::Result::Category>
211
212
=cut
213
214
__PACKAGE__->belongs_to(
215
  "categorycode",
216
  "Koha::Schema::Result::Category",
217
  { categorycode => "categorycode" },
218
  { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
219
);
220
221
222
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-11-30 12:24:04
223
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lQbpkjRIhSCiv17bsns6TQ
224
225
226
# You can replace this text with custom code or comments, and it will be preserved on regeneration
227
1;
(-)a/Koha/Schema/Result/AnonymizedBorrowerAttribute.pm (+115 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::AnonymizedBorrowerAttribute;
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::AnonymizedBorrowerAttribute
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<anonymized_borrower_attributes>
19
20
=cut
21
22
__PACKAGE__->table("anonymized_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 hashed_borrowernumber
33
34
  data_type: 'varchar'
35
  is_foreign_key: 1
36
  is_nullable: 0
37
  size: 60
38
39
=head2 code
40
41
  data_type: 'varchar'
42
  is_foreign_key: 1
43
  is_nullable: 0
44
  size: 10
45
46
=head2 attribute
47
48
  data_type: 'varchar'
49
  is_nullable: 1
50
  size: 255
51
52
=cut
53
54
__PACKAGE__->add_columns(
55
  "id",
56
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
57
  "hashed_borrowernumber",
58
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 60 },
59
  "code",
60
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
61
  "attribute",
62
  { data_type => "varchar", is_nullable => 1, size => 255 },
63
);
64
65
=head1 PRIMARY KEY
66
67
=over 4
68
69
=item * L</id>
70
71
=back
72
73
=cut
74
75
__PACKAGE__->set_primary_key("id");
76
77
=head1 RELATIONS
78
79
=head2 code
80
81
Type: belongs_to
82
83
Related object: L<Koha::Schema::Result::BorrowerAttributeType>
84
85
=cut
86
87
__PACKAGE__->belongs_to(
88
  "code",
89
  "Koha::Schema::Result::BorrowerAttributeType",
90
  { code => "code" },
91
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
92
);
93
94
=head2 hashed_borrowernumber
95
96
Type: belongs_to
97
98
Related object: L<Koha::Schema::Result::AnonymizedBorrower>
99
100
=cut
101
102
__PACKAGE__->belongs_to(
103
  "hashed_borrowernumber",
104
  "Koha::Schema::Result::AnonymizedBorrower",
105
  { hashed_borrowernumber => "hashed_borrowernumber" },
106
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
107
);
108
109
110
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-11-30 12:24:04
111
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wl4geCzsGg46pVtJpLXduw
112
113
114
# You can replace this text with custom code or comments, and it will be preserved on regeneration
115
1;
(-)a/Koha/Schema/Result/AnonymizedTransaction.pm (+138 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::AnonymizedTransaction;
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::AnonymizedTransaction
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<anonymized_transactions>
19
20
=cut
21
22
__PACKAGE__->table("anonymized_transactions");
23
24
=head1 ACCESSORS
25
26
=head2 hashed_borrowernumber
27
28
  data_type: 'varchar'
29
  is_foreign_key: 1
30
  is_nullable: 0
31
  size: 60
32
33
=head2 datetime
34
35
  data_type: 'datetime'
36
  datetime_undef_if_invalid: 1
37
  is_nullable: 1
38
39
=head2 branchcode
40
41
  data_type: 'varchar'
42
  is_nullable: 1
43
  size: 10
44
45
=head2 transaction_type
46
47
  data_type: 'varchar'
48
  is_nullable: 1
49
  size: 16
50
51
=head2 itemnumber
52
53
  data_type: 'integer'
54
  is_nullable: 1
55
56
=head2 itemtype
57
58
  data_type: 'varchar'
59
  is_nullable: 1
60
  size: 10
61
62
=head2 holdingbranch
63
64
  data_type: 'varchar'
65
  is_nullable: 1
66
  size: 10
67
68
=head2 location
69
70
  data_type: 'varchar'
71
  is_nullable: 1
72
  size: 80
73
74
=head2 itemcallnumber
75
76
  data_type: 'varchar'
77
  is_nullable: 1
78
  size: 255
79
80
=head2 ccode
81
82
  data_type: 'varchar'
83
  is_nullable: 1
84
  size: 80
85
86
=cut
87
88
__PACKAGE__->add_columns(
89
  "hashed_borrowernumber",
90
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 60 },
91
  "datetime",
92
  {
93
    data_type => "datetime",
94
    datetime_undef_if_invalid => 1,
95
    is_nullable => 1,
96
  },
97
  "branchcode",
98
  { data_type => "varchar", is_nullable => 1, size => 10 },
99
  "transaction_type",
100
  { data_type => "varchar", is_nullable => 1, size => 16 },
101
  "itemnumber",
102
  { data_type => "integer", is_nullable => 1 },
103
  "itemtype",
104
  { data_type => "varchar", is_nullable => 1, size => 10 },
105
  "holdingbranch",
106
  { data_type => "varchar", is_nullable => 1, size => 10 },
107
  "location",
108
  { data_type => "varchar", is_nullable => 1, size => 80 },
109
  "itemcallnumber",
110
  { data_type => "varchar", is_nullable => 1, size => 255 },
111
  "ccode",
112
  { data_type => "varchar", is_nullable => 1, size => 80 },
113
);
114
115
=head1 RELATIONS
116
117
=head2 hashed_borrowernumber
118
119
Type: belongs_to
120
121
Related object: L<Koha::Schema::Result::AnonymizedBorrower>
122
123
=cut
124
125
__PACKAGE__->belongs_to(
126
  "hashed_borrowernumber",
127
  "Koha::Schema::Result::AnonymizedBorrower",
128
  { hashed_borrowernumber => "hashed_borrowernumber" },
129
  { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
130
);
131
132
133
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-11-30 12:24:04
134
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ssL4bJi/Ocn7ok2d6fSeQA
135
136
137
# You can replace this text with custom code or comments, and it will be preserved on regeneration
138
1;
(-)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_anonymized
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_anonymized",
125
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
118
);
126
);
119
127
120
=head1 PRIMARY KEY
128
=head1 PRIMARY KEY
Lines 131-136 __PACKAGE__->set_primary_key("code"); Link Here
131
139
132
=head1 RELATIONS
140
=head1 RELATIONS
133
141
142
=head2 anonymized_borrower_attributes
143
144
Type: has_many
145
146
Related object: L<Koha::Schema::Result::AnonymizedBorrowerAttribute>
147
148
=cut
149
150
__PACKAGE__->has_many(
151
  "anonymized_borrower_attributes",
152
  "Koha::Schema::Result::AnonymizedBorrowerAttribute",
153
  { "foreign.code" => "self.code" },
154
  { cascade_copy => 0, cascade_delete => 0 },
155
);
156
134
=head2 borrower_attribute_types_branches
157
=head2 borrower_attribute_types_branches
135
158
136
Type: has_many
159
Type: has_many
Lines 162-169 __PACKAGE__->has_many( Link Here
162
);
185
);
163
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 @ 2019-11-30 12:24:04
166
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gsPR8PuUUZHFUkr3MIbTpw
189
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ce+VgMJUdN95mONcdnoTFA
167
190
168
__PACKAGE__->add_columns(
191
__PACKAGE__->add_columns(
169
    '+keep_for_anonymized' => { is_boolean => 1 },
192
    '+keep_for_anonymized' => { is_boolean => 1 },
(-)a/Koha/Schema/Result/Branch.pm (-2 / +17 lines)
Lines 256-261 __PACKAGE__->has_many( Link Here
256
  { cascade_copy => 0, cascade_delete => 0 },
256
  { cascade_copy => 0, cascade_delete => 0 },
257
);
257
);
258
258
259
=head2 anonymized_borrowers
260
261
Type: has_many
262
263
Related object: L<Koha::Schema::Result::AnonymizedBorrower>
264
265
=cut
266
267
__PACKAGE__->has_many(
268
  "anonymized_borrowers",
269
  "Koha::Schema::Result::AnonymizedBorrower",
270
  { "foreign.branchcode" => "self.branchcode" },
271
  { cascade_copy => 0, cascade_delete => 0 },
272
);
273
259
=head2 aqbaskets
274
=head2 aqbaskets
260
275
261
Type: has_many
276
Type: has_many
Lines 707-714 __PACKAGE__->has_many( Link Here
707
);
722
);
708
723
709
724
710
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-14 09:59:52
725
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-11-30 12:24:05
711
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vWDJAm3K2jiyRS3htyip6A
726
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JsEFwbl010ReFB268ESa4g
712
727
713
__PACKAGE__->add_columns(
728
__PACKAGE__->add_columns(
714
    '+pickup_location' => { is_boolean => 1 }
729
    '+pickup_location' => { is_boolean => 1 }
(-)a/Koha/Schema/Result/Category.pm (-3 / +17 lines)
Lines 205-210 __PACKAGE__->set_primary_key("categorycode"); Link Here
205
205
206
=head1 RELATIONS
206
=head1 RELATIONS
207
207
208
=head2 anonymized_borrowers
209
210
Type: has_many
211
212
Related object: L<Koha::Schema::Result::AnonymizedBorrower>
213
214
=cut
215
216
__PACKAGE__->has_many(
217
  "anonymized_borrowers",
218
  "Koha::Schema::Result::AnonymizedBorrower",
219
  { "foreign.categorycode" => "self.categorycode" },
220
  { cascade_copy => 0, cascade_delete => 0 },
221
);
222
208
=head2 borrower_message_preferences
223
=head2 borrower_message_preferences
209
224
210
Type: has_many
225
Type: has_many
Lines 266-273 __PACKAGE__->has_many( Link Here
266
);
281
);
267
282
268
283
269
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2019-04-12 02:43:58
284
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-11-30 12:24:05
270
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7rwTH9HuxcdRCBP/bj0d/A
285
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hOPnK0epHRIW4W14r91ong
271
286
272
sub koha_object_class {
287
sub koha_object_class {
273
    'Koha::Patron::Category';
288
    'Koha::Patron::Category';
274
- 

Return to bug 24151