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

(-)a/Koha/Schema/Result/OaiHarvest.pm (+180 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::OaiHarvest;
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::OaiHarvest
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<oai_harvest>
19
20
=cut
21
22
__PACKAGE__->table("oai_harvest");
23
24
=head1 ACCESSORS
25
26
=head2 oai_harvest_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 repository_id
33
34
  data_type: 'integer'
35
  is_foreign_key: 1
36
  is_nullable: 0
37
38
=head2 system_number
39
40
  data_type: 'integer'
41
  is_nullable: 1
42
43
=head2 action
44
45
  data_type: 'varchar'
46
  is_nullable: 1
47
  size: 45
48
49
=head2 timestamp
50
51
  data_type: 'timestamp'
52
  datetime_undef_if_invalid: 1
53
  default_value: current_timestamp
54
  is_nullable: 0
55
56
=head2 identifier
57
58
  data_type: 'varchar'
59
  is_nullable: 0
60
  size: 255
61
62
=head2 datestamp
63
64
  data_type: 'varchar'
65
  is_nullable: 0
66
  size: 45
67
68
=head2 metadata_prefix
69
70
  data_type: 'varchar'
71
  is_nullable: 0
72
  size: 45
73
74
=head2 metadata
75
76
  data_type: 'longtext'
77
  is_nullable: 1
78
79
=head2 record_type
80
81
  data_type: 'enum'
82
  default_value: 'biblio'
83
  extra: {list => ["biblio","auth","holdings"]}
84
  is_nullable: 0
85
86
=head2 original_system_number
87
88
  data_type: 'varchar'
89
  is_nullable: 1
90
  size: 45
91
92
=cut
93
94
__PACKAGE__->add_columns(
95
  "oai_harvest_id",
96
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
97
  "repository_id",
98
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
99
  "system_number",
100
  { data_type => "integer", is_nullable => 1 },
101
  "action",
102
  { data_type => "varchar", is_nullable => 1, size => 45 },
103
  "timestamp",
104
  {
105
    data_type => "timestamp",
106
    datetime_undef_if_invalid => 1,
107
    default_value => \"current_timestamp",
108
    is_nullable => 0,
109
  },
110
  "identifier",
111
  { data_type => "varchar", is_nullable => 0, size => 255 },
112
  "datestamp",
113
  { data_type => "varchar", is_nullable => 0, size => 45 },
114
  "metadata_prefix",
115
  { data_type => "varchar", is_nullable => 0, size => 45 },
116
  "metadata",
117
  { data_type => "longtext", is_nullable => 1 },
118
  "record_type",
119
  {
120
    data_type => "enum",
121
    default_value => "biblio",
122
    extra => { list => ["biblio", "auth", "holdings"] },
123
    is_nullable => 0,
124
  },
125
  "original_system_number",
126
  { data_type => "varchar", is_nullable => 1, size => 45 },
127
);
128
129
=head1 PRIMARY KEY
130
131
=over 4
132
133
=item * L</oai_harvest_id>
134
135
=back
136
137
=cut
138
139
__PACKAGE__->set_primary_key("oai_harvest_id");
140
141
=head1 UNIQUE CONSTRAINTS
142
143
=head2 C<harvest_identifier_datestamp>
144
145
=over 4
146
147
=item * L</identifier>
148
149
=item * L</datestamp>
150
151
=back
152
153
=cut
154
155
__PACKAGE__->add_unique_constraint("harvest_identifier_datestamp", ["identifier", "datestamp"]);
156
157
=head1 RELATIONS
158
159
=head2 repository
160
161
Type: belongs_to
162
163
Related object: L<Koha::Schema::Result::OaiHarvestRepository>
164
165
=cut
166
167
__PACKAGE__->belongs_to(
168
  "repository",
169
  "Koha::Schema::Result::OaiHarvestRepository",
170
  { repository_id => "repository_id" },
171
  { is_deferrable => 1, on_delete => "RESTRICT", on_update => "NO ACTION" },
172
);
173
174
175
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-08-18 11:54:57
176
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MeU+dn+S+ynl/VOAVe0elA
177
178
179
# You can replace this text with custom code or comments, and it will be preserved on regeneration
180
1;
(-)a/Koha/Schema/Result/OaiHarvestRepository.pm (-1 / +223 lines)
Line 0 Link Here
0
- 
1
use utf8;
2
package Koha::Schema::Result::OaiHarvestRepository;
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::OaiHarvestRepository
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<oai_harvest_repositories>
19
20
=cut
21
22
__PACKAGE__->table("oai_harvest_repositories");
23
24
=head1 ACCESSORS
25
26
=head2 repository_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 base_url
33
34
  data_type: 'text'
35
  is_nullable: 0
36
37
=head2 basic_username
38
39
  data_type: 'text'
40
  is_nullable: 1
41
42
=head2 basic_password
43
44
  data_type: 'text'
45
  is_nullable: 1
46
47
=head2 basic_realm
48
49
  data_type: 'text'
50
  is_nullable: 1
51
52
=head2 datetime_granularity
53
54
  data_type: 'enum'
55
  default_value: 'YYYY-MM-DD'
56
  extra: {list => ["YYYY-MM-DDThh:mm:ssZ","YYYY-MM-DD"]}
57
  is_nullable: 0
58
59
=head2 opt_from
60
61
  data_type: 'datetime'
62
  datetime_undef_if_invalid: 1
63
  is_nullable: 1
64
65
=head2 opt_until
66
67
  data_type: 'datetime'
68
  datetime_undef_if_invalid: 1
69
  is_nullable: 1
70
71
=head2 opt_set
72
73
  data_type: 'varchar'
74
  is_nullable: 1
75
  size: 45
76
77
=head2 metadata_prefix
78
79
  data_type: 'varchar'
80
  is_nullable: 0
81
  size: 45
82
83
=head2 active
84
85
  data_type: 'integer'
86
  default_value: 0
87
  is_nullable: 0
88
89
=head2 timestamp
90
91
  data_type: 'timestamp'
92
  datetime_undef_if_invalid: 1
93
  default_value: current_timestamp
94
  is_nullable: 0
95
96
=head2 xslt_path
97
98
  data_type: 'text'
99
  is_nullable: 1
100
101
=head2 frameworkcode
102
103
  data_type: 'varchar'
104
  default_value: (empty string)
105
  is_nullable: 0
106
  size: 4
107
108
=head2 comments
109
110
  data_type: 'text'
111
  is_nullable: 1
112
113
=head2 record_type
114
115
  data_type: 'enum'
116
  default_value: 'biblio'
117
  extra: {list => ["biblio","auth","holdings"]}
118
  is_nullable: 0
119
120
=head2 original_system_field
121
122
  data_type: 'varchar'
123
  is_nullable: 1
124
  size: 45
125
126
=cut
127
128
__PACKAGE__->add_columns(
129
  "repository_id",
130
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
131
  "base_url",
132
  { data_type => "text", is_nullable => 0 },
133
  "basic_username",
134
  { data_type => "text", is_nullable => 1 },
135
  "basic_password",
136
  { data_type => "text", is_nullable => 1 },
137
  "basic_realm",
138
  { data_type => "text", is_nullable => 1 },
139
  "datetime_granularity",
140
  {
141
    data_type => "enum",
142
    default_value => "YYYY-MM-DD",
143
    extra => { list => ["YYYY-MM-DDThh:mm:ssZ", "YYYY-MM-DD"] },
144
    is_nullable => 0,
145
  },
146
  "opt_from",
147
  {
148
    data_type => "datetime",
149
    datetime_undef_if_invalid => 1,
150
    is_nullable => 1,
151
  },
152
  "opt_until",
153
  {
154
    data_type => "datetime",
155
    datetime_undef_if_invalid => 1,
156
    is_nullable => 1,
157
  },
158
  "opt_set",
159
  { data_type => "varchar", is_nullable => 1, size => 45 },
160
  "metadata_prefix",
161
  { data_type => "varchar", is_nullable => 0, size => 45 },
162
  "active",
163
  { data_type => "integer", default_value => 0, is_nullable => 0 },
164
  "timestamp",
165
  {
166
    data_type => "timestamp",
167
    datetime_undef_if_invalid => 1,
168
    default_value => \"current_timestamp",
169
    is_nullable => 0,
170
  },
171
  "xslt_path",
172
  { data_type => "text", is_nullable => 1 },
173
  "frameworkcode",
174
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 4 },
175
  "comments",
176
  { data_type => "text", is_nullable => 1 },
177
  "record_type",
178
  {
179
    data_type => "enum",
180
    default_value => "biblio",
181
    extra => { list => ["biblio", "auth", "holdings"] },
182
    is_nullable => 0,
183
  },
184
  "original_system_field",
185
  { data_type => "varchar", is_nullable => 1, size => 45 },
186
);
187
188
=head1 PRIMARY KEY
189
190
=over 4
191
192
=item * L</repository_id>
193
194
=back
195
196
=cut
197
198
__PACKAGE__->set_primary_key("repository_id");
199
200
=head1 RELATIONS
201
202
=head2 oai_harvests
203
204
Type: has_many
205
206
Related object: L<Koha::Schema::Result::OaiHarvest>
207
208
=cut
209
210
__PACKAGE__->has_many(
211
  "oai_harvests",
212
  "Koha::Schema::Result::OaiHarvest",
213
  { "foreign.repository_id" => "self.repository_id" },
214
  { cascade_copy => 0, cascade_delete => 0 },
215
);
216
217
218
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-08-18 11:54:57
219
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EX+ru6uCSB83y41RHERfhw
220
221
222
# You can replace this text with custom code or comments, and it will be preserved on regeneration
223
1;

Return to bug 10662