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

(-)a/Koha/Schema/Result/AdditionalContent.pm (-41 / +23 lines)
Lines 23-36 __PACKAGE__->table("additional_contents"); Link Here
23
23
24
=head1 ACCESSORS
24
=head1 ACCESSORS
25
25
26
=head2 idnew
26
=head2 id
27
27
28
  data_type: 'integer'
28
  data_type: 'integer'
29
  extra: {unsigned => 1}
29
  extra: {unsigned => 1}
30
  is_auto_increment: 1
30
  is_auto_increment: 1
31
  is_nullable: 0
31
  is_nullable: 0
32
32
33
unique identifier for the additional content
33
unique identifier for the additional content category
34
34
35
=head2 category
35
=head2 category
36
36
Lines 65-95 location of the additional content Link Here
65
65
66
branch code users to create branch specific additional content, NULL is every branch.
66
branch code users to create branch specific additional content, NULL is every branch.
67
67
68
=head2 title
69
70
  data_type: 'varchar'
71
  default_value: (empty string)
72
  is_nullable: 0
73
  size: 250
74
75
title of the additional content
76
77
=head2 content
78
79
  data_type: 'mediumtext'
80
  is_nullable: 0
81
82
the body of your additional content
83
84
=head2 lang
85
86
  data_type: 'varchar'
87
  default_value: (empty string)
88
  is_nullable: 0
89
  size: 50
90
91
location for the additional content(koha is the staff interface, slip is the circulation receipt and language codes are for the opac)
92
93
=head2 published_on
68
=head2 published_on
94
69
95
  data_type: 'date'
70
  data_type: 'date'
Lines 133-139 The user who created the additional content Link Here
133
=cut
108
=cut
134
109
135
__PACKAGE__->add_columns(
110
__PACKAGE__->add_columns(
136
  "idnew",
111
  "id",
137
  {
112
  {
138
    data_type => "integer",
113
    data_type => "integer",
139
    extra => { unsigned => 1 },
114
    extra => { unsigned => 1 },
Lines 148-159 __PACKAGE__->add_columns( Link Here
148
  { data_type => "varchar", is_nullable => 0, size => 255 },
123
  { data_type => "varchar", is_nullable => 0, size => 255 },
149
  "branchcode",
124
  "branchcode",
150
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
125
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
151
  "title",
152
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 250 },
153
  "content",
154
  { data_type => "mediumtext", is_nullable => 0 },
155
  "lang",
156
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 50 },
157
  "published_on",
126
  "published_on",
158
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
127
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
159
  "updated_on",
128
  "updated_on",
Lines 175-187 __PACKAGE__->add_columns( Link Here
175
144
176
=over 4
145
=over 4
177
146
178
=item * L</idnew>
147
=item * L</id>
179
148
180
=back
149
=back
181
150
182
=cut
151
=cut
183
152
184
__PACKAGE__->set_primary_key("idnew");
153
__PACKAGE__->set_primary_key("id");
185
154
186
=head1 UNIQUE CONSTRAINTS
155
=head1 UNIQUE CONSTRAINTS
187
156
Lines 195-213 __PACKAGE__->set_primary_key("idnew"); Link Here
195
164
196
=item * L</branchcode>
165
=item * L</branchcode>
197
166
198
=item * L</lang>
199
200
=back
167
=back
201
168
202
=cut
169
=cut
203
170
204
__PACKAGE__->add_unique_constraint(
171
__PACKAGE__->add_unique_constraint(
205
  "additional_contents_uniq",
172
  "additional_contents_uniq",
206
  ["category", "code", "branchcode", "lang"],
173
  ["category", "code", "branchcode"],
207
);
174
);
208
175
209
=head1 RELATIONS
176
=head1 RELATIONS
210
177
178
=head2 additional_contents_localizations
179
180
Type: has_many
181
182
Related object: L<Koha::Schema::Result::AdditionalContentsLocalization>
183
184
=cut
185
186
__PACKAGE__->has_many(
187
  "additional_contents_localizations",
188
  "Koha::Schema::Result::AdditionalContentsLocalization",
189
  { "foreign.additional_content_id" => "self.id" },
190
  { cascade_copy => 0, cascade_delete => 0 },
191
);
192
211
=head2 borrowernumber
193
=head2 borrowernumber
212
194
213
Type: belongs_to
195
Type: belongs_to
Lines 249-256 __PACKAGE__->belongs_to( Link Here
249
);
231
);
250
232
251
233
252
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-02 07:12:59
234
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-03-03 07:19:57
253
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/h/wWfmyVxW7skwrMn3scg
235
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0w/fOUAy+4V4aVls/i7Wig
254
236
255
237
256
# You can replace this text with custom code or comments, and it will be preserved on regeneration
238
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/AdditionalContentsLocalization.pm (+148 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::AdditionalContentsLocalization;
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::AdditionalContentsLocalization
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<additional_contents_localizations>
19
20
=cut
21
22
__PACKAGE__->table("additional_contents_localizations");
23
24
=head1 ACCESSORS
25
26
=head2 id
27
28
  data_type: 'integer'
29
  extra: {unsigned => 1}
30
  is_auto_increment: 1
31
  is_nullable: 0
32
33
unique identifier for the additional content
34
35
=head2 additional_content_id
36
37
  data_type: 'integer'
38
  extra: {unsigned => 1}
39
  is_foreign_key: 1
40
  is_nullable: 0
41
42
link to the additional content
43
44
=head2 title
45
46
  data_type: 'varchar'
47
  default_value: (empty string)
48
  is_nullable: 0
49
  size: 250
50
51
title of the additional content
52
53
=head2 content
54
55
  data_type: 'mediumtext'
56
  is_nullable: 0
57
58
the body of your additional content
59
60
=head2 lang
61
62
  data_type: 'varchar'
63
  default_value: (empty string)
64
  is_nullable: 0
65
  size: 50
66
67
lang
68
69
=cut
70
71
__PACKAGE__->add_columns(
72
  "id",
73
  {
74
    data_type => "integer",
75
    extra => { unsigned => 1 },
76
    is_auto_increment => 1,
77
    is_nullable => 0,
78
  },
79
  "additional_content_id",
80
  {
81
    data_type => "integer",
82
    extra => { unsigned => 1 },
83
    is_foreign_key => 1,
84
    is_nullable => 0,
85
  },
86
  "title",
87
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 250 },
88
  "content",
89
  { data_type => "mediumtext", is_nullable => 0 },
90
  "lang",
91
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 50 },
92
);
93
94
=head1 PRIMARY KEY
95
96
=over 4
97
98
=item * L</id>
99
100
=back
101
102
=cut
103
104
__PACKAGE__->set_primary_key("id");
105
106
=head1 UNIQUE CONSTRAINTS
107
108
=head2 C<additional_contents_localizations_uniq>
109
110
=over 4
111
112
=item * L</additional_content_id>
113
114
=item * L</lang>
115
116
=back
117
118
=cut
119
120
__PACKAGE__->add_unique_constraint(
121
  "additional_contents_localizations_uniq",
122
  ["additional_content_id", "lang"],
123
);
124
125
=head1 RELATIONS
126
127
=head2 additional_content
128
129
Type: belongs_to
130
131
Related object: L<Koha::Schema::Result::AdditionalContent>
132
133
=cut
134
135
__PACKAGE__->belongs_to(
136
  "additional_content",
137
  "Koha::Schema::Result::AdditionalContent",
138
  { id => "additional_content_id" },
139
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
140
);
141
142
143
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-03-08 08:09:35
144
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KRaaWslsavWVmDbZF/NwcQ
145
146
147
# You can replace this text with custom code or comments, and it will be preserved on regeneration
148
1;
(-)a/Koha/Schema/Result/Branch.pm (-3 / +2 lines)
Lines 918-925 __PACKAGE__->has_many( Link Here
918
);
918
);
919
919
920
920
921
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-08 17:35:26
921
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-03-03 07:23:06
922
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QPqXuEigMeIBb9NKMSkrNw
922
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fGcjGoFNNgRbixuJTah55Q
923
923
924
__PACKAGE__->add_columns(
924
__PACKAGE__->add_columns(
925
    '+pickup_location' => { is_boolean => 1 },
925
    '+pickup_location' => { is_boolean => 1 },
926
- 

Return to bug 31383