enju_seed 0.3.0.beta.1 → 0.3.0.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +9 -1
- data/db/migrate/20140122054321_create_profiles.rb +6 -1
- data/lib/enju_seed/version.rb +1 -1
- data/spec/dummy/db/migrate/001_create_agents.rb +6 -6
- data/spec/dummy/db/migrate/005_create_manifestations.rb +12 -12
- data/spec/dummy/db/migrate/006_create_items.rb +5 -5
- data/spec/dummy/db/migrate/012_create_owns.rb +2 -2
- data/spec/dummy/db/migrate/015_create_creates.rb +2 -2
- data/spec/dummy/db/migrate/047_create_produces.rb +2 -2
- data/spec/dummy/db/migrate/059_create_libraries.rb +7 -7
- data/spec/dummy/db/migrate/069_create_shelves.rb +3 -3
- data/spec/dummy/db/migrate/073_create_carrier_types.rb +1 -1
- data/spec/dummy/db/migrate/080_create_library_groups.rb +2 -2
- data/spec/dummy/db/migrate/112_create_frequencies.rb +1 -1
- data/spec/dummy/db/migrate/117_create_form_of_works.rb +1 -1
- data/spec/dummy/db/migrate/120_create_baskets.rb +1 -1
- data/spec/dummy/db/migrate/124_create_bookstores.rb +1 -1
- data/spec/dummy/db/migrate/125_create_donates.rb +2 -2
- data/spec/dummy/db/migrate/130_create_request_status_types.rb +1 -1
- data/spec/dummy/db/migrate/131_create_request_types.rb +1 -1
- data/spec/dummy/db/migrate/133_create_agent_merges.rb +1 -1
- data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +2 -2
- data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +3 -3
- data/spec/dummy/db/migrate/20080905191442_create_agent_types.rb +1 -1
- data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +3 -3
- data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +4 -4
- data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +5 -5
- data/spec/dummy/db/migrate/20081025083323_create_countries.rb +9 -8
- data/spec/dummy/db/migrate/20081025083905_create_languages.rb +6 -5
- data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +1 -1
- data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +1 -1
- data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +1 -1
- data/spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb +1 -1
- data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +1 -1
- data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +1 -1
- data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +1 -1
- data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +3 -3
- data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +1 -0
- data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +1 -0
- data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +2 -1
- data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +1 -1
- data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +2 -2
- data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +5 -5
- data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +4 -4
- data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +4 -4
- data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +5 -5
- data/spec/dummy/db/migrate/20160813191533_add_book_jacket_source_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20160813191820_add_screenshot_generator_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20161114083857_add_image_data_to_picture_file.rb +5 -0
- data/spec/dummy/db/migrate/20161115184747_add_attachment_data_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20161115184756_add_attachment_data_to_user_export_file.rb +5 -0
- data/spec/dummy/db/schema.rb +1423 -1417
- metadata +264 -254
@@ -1,20 +1,21 @@
|
|
1
1
|
class CreateLanguages < ActiveRecord::Migration
|
2
|
+
|
2
3
|
# ISO 639 is the set of international standards that lists short codes for language names.
|
3
4
|
# Note this doesn't include macrolanguages (dialects)
|
4
5
|
# Information on macrolanguages http://en.wikipedia.org/wiki/ISO_639_macrolanguage
|
5
6
|
|
6
7
|
def change
|
7
8
|
create_table :languages do |t|
|
8
|
-
t.string :name, null
|
9
|
+
t.string :name, :null => false
|
9
10
|
t.string :native_name
|
10
11
|
t.text :display_name
|
11
|
-
t.string :iso_639_1, size
|
12
|
-
t.string :iso_639_2, size
|
13
|
-
t.string :iso_639_3, size
|
12
|
+
t.string :iso_639_1, :size => 3
|
13
|
+
t.string :iso_639_2, :size => 3
|
14
|
+
t.string :iso_639_3, :size => 3
|
14
15
|
t.text :note
|
15
16
|
t.integer :position
|
16
17
|
end
|
17
|
-
add_index :languages, :name, unique
|
18
|
+
add_index :languages, :name, :unique => true
|
18
19
|
add_index :languages, :iso_639_1
|
19
20
|
add_index :languages, :iso_639_2
|
20
21
|
add_index :languages, :iso_639_3
|
@@ -10,6 +10,6 @@ class CreatePictureFiles < ActiveRecord::Migration
|
|
10
10
|
|
11
11
|
t.timestamps
|
12
12
|
end
|
13
|
-
add_index :picture_files, [:picture_attachable_id, :picture_attachable_type], name
|
13
|
+
add_index :picture_files, [:picture_attachable_id, :picture_attachable_type], :name => "index_picture_files_on_picture_attachable_id_and_type"
|
14
14
|
end
|
15
15
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class AddValidPeriodForNewUserToUserGroup < ActiveRecord::Migration
|
2
2
|
def self.up
|
3
|
-
add_column :user_groups, :valid_period_for_new_user, :integer, default
|
3
|
+
add_column :user_groups, :valid_period_for_new_user, :integer, :default => 0, :null => false
|
4
4
|
add_column :user_groups, :expired_at, :timestamp
|
5
5
|
end
|
6
6
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
class CreateSeriesStatementMerges < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :series_statement_merges do |t|
|
4
|
-
t.integer :series_statement_id, null
|
5
|
-
t.integer :series_statement_merge_list_id, null
|
4
|
+
t.integer :series_statement_id, :null => false
|
5
|
+
t.integer :series_statement_merge_list_id, :null => false
|
6
6
|
|
7
7
|
t.timestamps
|
8
8
|
end
|
9
9
|
add_index :series_statement_merges, :series_statement_id
|
10
|
-
add_index :series_statement_merges, :series_statement_merge_list_id, name:
|
10
|
+
add_index :series_statement_merges, :series_statement_merge_list_id, name: "index_series_statement_merges_on_list_id"
|
11
11
|
end
|
12
12
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
class CreateIdentifiers < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :identifiers do |t|
|
4
|
-
t.string :body, null
|
5
|
-
t.integer :identifier_type_id, null
|
4
|
+
t.string :body, :null => false
|
5
|
+
t.integer :identifier_type_id, :null => false
|
6
6
|
t.integer :manifestation_id
|
7
7
|
t.boolean :primary
|
8
8
|
t.integer :position
|
@@ -2,17 +2,17 @@ class CreateResourceImportFileTransitions < ActiveRecord::Migration
|
|
2
2
|
def change
|
3
3
|
create_table :resource_import_file_transitions do |t|
|
4
4
|
t.string :to_state
|
5
|
-
if ActiveRecord::Base.configurations[Rails.env][
|
6
|
-
t.
|
5
|
+
if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
|
6
|
+
t.jsonb :metadata
|
7
7
|
else
|
8
|
-
t.
|
8
|
+
t.jsonb :metadata, default: "{}"
|
9
9
|
end
|
10
10
|
t.integer :sort_key
|
11
11
|
t.integer :resource_import_file_id
|
12
12
|
t.timestamps
|
13
13
|
end
|
14
14
|
|
15
|
-
add_index :resource_import_file_transitions, :resource_import_file_id, name:
|
16
|
-
add_index :resource_import_file_transitions, [:sort_key, :resource_import_file_id], unique: true, name:
|
15
|
+
add_index :resource_import_file_transitions, :resource_import_file_id, name: "index_resource_import_file_transitions_on_file_id"
|
16
|
+
add_index :resource_import_file_transitions, [:sort_key, :resource_import_file_id], unique: true, name: "index_resource_import_file_transitions_on_sort_key_and_file_id"
|
17
17
|
end
|
18
18
|
end
|
@@ -2,10 +2,10 @@ class CreateImportRequestTransitions < ActiveRecord::Migration
|
|
2
2
|
def change
|
3
3
|
create_table :import_request_transitions do |t|
|
4
4
|
t.string :to_state
|
5
|
-
if ActiveRecord::Base.configurations[Rails.env][
|
6
|
-
t.
|
5
|
+
if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
|
6
|
+
t.jsonb :metadata
|
7
7
|
else
|
8
|
-
t.
|
8
|
+
t.jsonb :metadata, default: "{}"
|
9
9
|
end
|
10
10
|
t.integer :sort_key
|
11
11
|
t.integer :import_request_id
|
@@ -13,6 +13,6 @@ class CreateImportRequestTransitions < ActiveRecord::Migration
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :import_request_transitions, :import_request_id
|
16
|
-
add_index :import_request_transitions, [:sort_key, :import_request_id], unique: true, name:
|
16
|
+
add_index :import_request_transitions, [:sort_key, :import_request_id], unique: true, name: "index_import_request_transitions_on_sort_key_and_request_id"
|
17
17
|
end
|
18
18
|
end
|
@@ -2,10 +2,10 @@ class CreateAgentImportFileTransitions < ActiveRecord::Migration
|
|
2
2
|
def change
|
3
3
|
create_table :agent_import_file_transitions do |t|
|
4
4
|
t.string :to_state
|
5
|
-
if ActiveRecord::Base.configurations[Rails.env][
|
6
|
-
t.
|
5
|
+
if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
|
6
|
+
t.jsonb :metadata
|
7
7
|
else
|
8
|
-
t.
|
8
|
+
t.jsonb :metadata, default: "{}"
|
9
9
|
end
|
10
10
|
t.integer :sort_key
|
11
11
|
t.integer :agent_import_file_id
|
@@ -13,6 +13,6 @@ class CreateAgentImportFileTransitions < ActiveRecord::Migration
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :agent_import_file_transitions, :agent_import_file_id
|
16
|
-
add_index :agent_import_file_transitions, [:sort_key, :agent_import_file_id], unique: true, name:
|
16
|
+
add_index :agent_import_file_transitions, [:sort_key, :agent_import_file_id], unique: true, name: "index_agent_import_file_transitions_on_sort_key_and_file_id"
|
17
17
|
end
|
18
18
|
end
|
@@ -2,17 +2,17 @@ class CreateResourceExportFileTransitions < ActiveRecord::Migration
|
|
2
2
|
def change
|
3
3
|
create_table :resource_export_file_transitions do |t|
|
4
4
|
t.string :to_state
|
5
|
-
if ActiveRecord::Base.configurations[Rails.env][
|
6
|
-
t.
|
5
|
+
if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
|
6
|
+
t.jsonb :metadata
|
7
7
|
else
|
8
|
-
t.
|
8
|
+
t.jsonb :metadata, default: "{}"
|
9
9
|
end
|
10
10
|
t.integer :sort_key
|
11
11
|
t.integer :resource_export_file_id
|
12
12
|
t.timestamps
|
13
13
|
end
|
14
14
|
|
15
|
-
add_index :resource_export_file_transitions, :resource_export_file_id, name:
|
16
|
-
add_index :resource_export_file_transitions, [:sort_key, :resource_export_file_id], unique: true, name:
|
15
|
+
add_index :resource_export_file_transitions, :resource_export_file_id, name: "index_resource_export_file_transitions_on_file_id"
|
16
|
+
add_index :resource_export_file_transitions, [:sort_key, :resource_export_file_id], unique: true, name: "index_resource_export_file_transitions_on_sort_key_and_file_id"
|
17
17
|
end
|
18
18
|
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -10,1422 +10,1428 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema.define(version:
|
13
|
+
ActiveRecord::Schema.define(version: 20161115184756) do
|
14
|
+
|
14
15
|
# These are extensions that must be enabled in order to support this database
|
15
|
-
enable_extension
|
16
|
-
|
17
|
-
create_table
|
18
|
-
t.integer
|
19
|
-
t.integer
|
20
|
-
t.integer
|
21
|
-
t.datetime
|
22
|
-
t.datetime
|
23
|
-
t.index [
|
24
|
-
t.index [
|
25
|
-
end
|
26
|
-
|
27
|
-
create_table
|
28
|
-
t.string
|
29
|
-
t.
|
30
|
-
t.integer
|
31
|
-
t.integer
|
32
|
-
t.datetime
|
33
|
-
t.datetime
|
34
|
-
t.boolean
|
35
|
-
t.index [
|
36
|
-
t.index
|
37
|
-
end
|
38
|
-
|
39
|
-
create_table
|
40
|
-
t.integer
|
41
|
-
t.string
|
42
|
-
t.integer
|
43
|
-
t.integer
|
44
|
-
t.text
|
45
|
-
t.datetime
|
46
|
-
t.string
|
47
|
-
t.string
|
48
|
-
t.integer
|
49
|
-
t.datetime
|
50
|
-
t.datetime
|
51
|
-
t.datetime
|
52
|
-
t.string
|
53
|
-
t.text
|
54
|
-
t.string
|
55
|
-
t.string
|
56
|
-
t.string
|
57
|
-
t.jsonb
|
58
|
-
t.index [
|
59
|
-
t.index [
|
60
|
-
t.index [
|
61
|
-
end
|
62
|
-
|
63
|
-
create_table
|
64
|
-
t.integer
|
65
|
-
t.integer
|
66
|
-
t.text
|
67
|
-
t.datetime
|
68
|
-
t.datetime
|
69
|
-
end
|
70
|
-
|
71
|
-
create_table
|
72
|
-
t.string
|
73
|
-
t.datetime
|
74
|
-
t.datetime
|
75
|
-
end
|
76
|
-
|
77
|
-
create_table
|
78
|
-
t.integer
|
79
|
-
t.integer
|
80
|
-
t.datetime
|
81
|
-
t.datetime
|
82
|
-
t.index [
|
83
|
-
t.index [
|
84
|
-
end
|
85
|
-
|
86
|
-
create_table
|
87
|
-
t.string
|
88
|
-
t.string
|
89
|
-
t.string
|
90
|
-
t.string
|
91
|
-
t.integer
|
92
|
-
t.integer
|
93
|
-
t.integer
|
94
|
-
t.integer
|
95
|
-
t.string
|
96
|
-
t.string
|
97
|
-
t.datetime
|
98
|
-
t.datetime
|
99
|
-
t.index [
|
100
|
-
t.index [
|
101
|
-
t.index [
|
102
|
-
t.index [
|
103
|
-
end
|
104
|
-
|
105
|
-
create_table
|
106
|
-
t.string
|
107
|
-
t.text
|
108
|
-
t.text
|
109
|
-
t.integer
|
110
|
-
t.datetime
|
111
|
-
t.datetime
|
112
|
-
end
|
113
|
-
|
114
|
-
create_table
|
115
|
-
t.integer
|
116
|
-
t.integer
|
117
|
-
t.integer
|
118
|
-
t.datetime
|
119
|
-
t.datetime
|
120
|
-
t.integer
|
121
|
-
t.index [
|
122
|
-
t.index [
|
123
|
-
end
|
124
|
-
|
125
|
-
create_table
|
126
|
-
t.string
|
127
|
-
t.text
|
128
|
-
t.text
|
129
|
-
t.integer
|
130
|
-
t.datetime
|
131
|
-
t.datetime
|
132
|
-
end
|
133
|
-
|
134
|
-
create_table
|
135
|
-
t.string
|
136
|
-
t.string
|
137
|
-
t.string
|
138
|
-
t.string
|
139
|
-
t.string
|
140
|
-
t.string
|
141
|
-
t.string
|
142
|
-
t.string
|
143
|
-
t.string
|
144
|
-
t.text
|
145
|
-
t.text
|
146
|
-
t.datetime
|
147
|
-
t.datetime
|
148
|
-
t.datetime
|
149
|
-
t.string
|
150
|
-
t.string
|
151
|
-
t.text
|
152
|
-
t.text
|
153
|
-
t.text
|
154
|
-
t.text
|
155
|
-
t.string
|
156
|
-
t.string
|
157
|
-
t.string
|
158
|
-
t.string
|
159
|
-
t.text
|
160
|
-
t.text
|
161
|
-
t.string
|
162
|
-
t.text
|
163
|
-
t.text
|
164
|
-
t.text
|
165
|
-
t.datetime
|
166
|
-
t.datetime
|
167
|
-
t.integer
|
168
|
-
t.integer
|
169
|
-
t.integer
|
170
|
-
t.integer
|
171
|
-
t.text
|
172
|
-
t.integer
|
173
|
-
t.integer
|
174
|
-
t.text
|
175
|
-
t.text
|
176
|
-
t.text
|
177
|
-
t.string
|
178
|
-
t.string
|
179
|
-
t.string
|
180
|
-
t.integer
|
181
|
-
t.index [
|
182
|
-
t.index [
|
183
|
-
t.index [
|
184
|
-
t.index [
|
185
|
-
t.index [
|
186
|
-
t.index [
|
187
|
-
end
|
188
|
-
|
189
|
-
create_table
|
190
|
-
t.integer
|
191
|
-
t.text
|
192
|
-
t.integer
|
193
|
-
t.datetime
|
194
|
-
t.datetime
|
195
|
-
t.index [
|
196
|
-
end
|
197
|
-
|
198
|
-
create_table
|
199
|
-
t.text
|
200
|
-
t.string
|
201
|
-
t.text
|
202
|
-
t.text
|
203
|
-
t.string
|
204
|
-
t.string
|
205
|
-
t.string
|
206
|
-
t.integer
|
207
|
-
t.datetime
|
208
|
-
t.datetime
|
209
|
-
t.datetime
|
210
|
-
end
|
211
|
-
|
212
|
-
create_table
|
213
|
-
t.string
|
214
|
-
t.text
|
215
|
-
t.text
|
216
|
-
t.integer
|
217
|
-
t.datetime
|
218
|
-
t.datetime
|
219
|
-
end
|
220
|
-
|
221
|
-
create_table
|
222
|
-
t.integer
|
223
|
-
t.integer
|
224
|
-
t.text
|
225
|
-
t.integer
|
226
|
-
t.datetime
|
227
|
-
t.datetime
|
228
|
-
t.index [
|
229
|
-
t.index [
|
230
|
-
end
|
231
|
-
|
232
|
-
create_table
|
233
|
-
t.string
|
234
|
-
t.text
|
235
|
-
t.text
|
236
|
-
t.integer
|
237
|
-
t.datetime
|
238
|
-
t.datetime
|
239
|
-
t.string
|
240
|
-
t.string
|
241
|
-
t.integer
|
242
|
-
t.string
|
243
|
-
t.jsonb
|
244
|
-
end
|
245
|
-
|
246
|
-
create_table
|
247
|
-
t.integer
|
248
|
-
t.integer
|
249
|
-
t.datetime
|
250
|
-
t.datetime
|
251
|
-
t.datetime
|
252
|
-
t.integer
|
253
|
-
t.index [
|
254
|
-
t.index [
|
255
|
-
end
|
256
|
-
|
257
|
-
create_table
|
258
|
-
t.integer
|
259
|
-
t.integer
|
260
|
-
t.integer
|
261
|
-
t.datetime
|
262
|
-
t.datetime
|
263
|
-
t.integer
|
264
|
-
t.index [
|
265
|
-
t.index [
|
266
|
-
t.index [
|
267
|
-
end
|
268
|
-
|
269
|
-
create_table
|
270
|
-
t.integer
|
271
|
-
t.integer
|
272
|
-
t.integer
|
273
|
-
t.datetime
|
274
|
-
t.datetime
|
275
|
-
t.index [
|
276
|
-
t.index [
|
277
|
-
end
|
278
|
-
|
279
|
-
create_table
|
280
|
-
t.integer
|
281
|
-
t.integer
|
282
|
-
t.integer
|
283
|
-
t.datetime
|
284
|
-
t.datetime
|
285
|
-
t.index [
|
286
|
-
t.index [
|
287
|
-
end
|
288
|
-
|
289
|
-
create_table
|
290
|
-
t.string
|
291
|
-
t.text
|
292
|
-
t.text
|
293
|
-
t.integer
|
294
|
-
t.datetime
|
295
|
-
t.datetime
|
296
|
-
t.index [
|
297
|
-
end
|
298
|
-
|
299
|
-
create_table
|
300
|
-
t.integer
|
301
|
-
t.integer
|
302
|
-
t.integer
|
303
|
-
t.integer
|
304
|
-
t.integer
|
305
|
-
t.datetime
|
306
|
-
t.integer
|
307
|
-
t.integer
|
308
|
-
t.datetime
|
309
|
-
t.datetime
|
310
|
-
t.integer
|
311
|
-
t.integer
|
312
|
-
t.index [
|
313
|
-
t.index [
|
314
|
-
t.index
|
315
|
-
t.index [
|
316
|
-
t.index [
|
317
|
-
t.index [
|
318
|
-
t.index [
|
319
|
-
t.index [
|
320
|
-
end
|
321
|
-
|
322
|
-
create_table
|
323
|
-
t.string
|
324
|
-
t.text
|
325
|
-
t.text
|
326
|
-
t.integer
|
327
|
-
t.datetime
|
328
|
-
t.datetime
|
329
|
-
end
|
330
|
-
|
331
|
-
create_table
|
332
|
-
t.integer
|
333
|
-
t.string
|
334
|
-
t.string
|
335
|
-
t.integer
|
336
|
-
t.datetime
|
337
|
-
t.datetime
|
338
|
-
t.index [
|
339
|
-
end
|
340
|
-
|
341
|
-
create_table
|
342
|
-
t.string
|
343
|
-
t.text
|
344
|
-
t.text
|
345
|
-
t.integer
|
346
|
-
t.datetime
|
347
|
-
t.datetime
|
348
|
-
t.string
|
349
|
-
t.string
|
350
|
-
t.integer
|
351
|
-
t.string
|
352
|
-
t.jsonb
|
353
|
-
end
|
354
|
-
|
355
|
-
create_table
|
356
|
-
t.string
|
357
|
-
t.text
|
358
|
-
t.string
|
359
|
-
t.string
|
360
|
-
t.string
|
361
|
-
t.text
|
362
|
-
t.integer
|
363
|
-
t.index [
|
364
|
-
t.index [
|
365
|
-
t.index [
|
366
|
-
t.index [
|
367
|
-
end
|
368
|
-
|
369
|
-
create_table
|
370
|
-
t.string
|
371
|
-
t.text
|
372
|
-
t.text
|
373
|
-
t.integer
|
374
|
-
t.datetime
|
375
|
-
t.datetime
|
376
|
-
end
|
377
|
-
|
378
|
-
create_table
|
379
|
-
t.integer
|
380
|
-
t.integer
|
381
|
-
t.integer
|
382
|
-
t.datetime
|
383
|
-
t.datetime
|
384
|
-
t.integer
|
385
|
-
t.index [
|
386
|
-
t.index [
|
387
|
-
end
|
388
|
-
|
389
|
-
create_table
|
390
|
-
t.integer
|
391
|
-
t.integer
|
392
|
-
t.integer
|
393
|
-
t.datetime
|
394
|
-
t.datetime
|
395
|
-
t.index [
|
396
|
-
t.index [
|
397
|
-
t.index [
|
398
|
-
end
|
399
|
-
|
400
|
-
create_table
|
401
|
-
t.string
|
402
|
-
t.string
|
403
|
-
t.integer
|
404
|
-
t.string
|
405
|
-
t.datetime
|
406
|
-
t.datetime
|
407
|
-
t.index [
|
408
|
-
t.index [
|
409
|
-
end
|
410
|
-
|
411
|
-
create_table
|
412
|
-
t.integer
|
413
|
-
t.integer
|
414
|
-
t.datetime
|
415
|
-
t.datetime
|
416
|
-
t.index [
|
417
|
-
t.index [
|
418
|
-
end
|
419
|
-
|
420
|
-
create_table
|
421
|
-
t.integer
|
422
|
-
t.integer
|
423
|
-
t.integer
|
424
|
-
t.datetime
|
425
|
-
t.datetime
|
426
|
-
t.index [
|
427
|
-
t.index [
|
428
|
-
end
|
429
|
-
|
430
|
-
create_table
|
431
|
-
t.string
|
432
|
-
t.text
|
433
|
-
t.text
|
434
|
-
t.integer
|
435
|
-
t.datetime
|
436
|
-
t.datetime
|
437
|
-
end
|
438
|
-
|
439
|
-
create_table
|
440
|
-
t.string
|
441
|
-
t.text
|
442
|
-
t.text
|
443
|
-
t.integer
|
444
|
-
t.datetime
|
445
|
-
t.datetime
|
446
|
-
end
|
447
|
-
|
448
|
-
create_table
|
449
|
-
t.string
|
450
|
-
t.text
|
451
|
-
t.text
|
452
|
-
t.integer
|
453
|
-
t.datetime
|
454
|
-
t.datetime
|
455
|
-
end
|
456
|
-
|
457
|
-
create_table
|
458
|
-
t.string
|
459
|
-
t.integer
|
460
|
-
t.integer
|
461
|
-
t.boolean
|
462
|
-
t.integer
|
463
|
-
t.datetime
|
464
|
-
t.datetime
|
465
|
-
t.index
|
466
|
-
t.index [
|
467
|
-
end
|
468
|
-
|
469
|
-
create_table
|
470
|
-
t.string
|
471
|
-
t.string
|
472
|
-
t.string
|
473
|
-
t.integer
|
474
|
-
t.datetime
|
475
|
-
t.datetime
|
476
|
-
t.string
|
477
|
-
t.index [
|
478
|
-
t.index [
|
479
|
-
t.index [
|
480
|
-
end
|
481
|
-
|
482
|
-
create_table
|
483
|
-
t.string
|
484
|
-
t.
|
485
|
-
t.integer
|
486
|
-
t.integer
|
487
|
-
t.datetime
|
488
|
-
t.datetime
|
489
|
-
t.boolean
|
490
|
-
t.index [
|
491
|
-
t.index
|
492
|
-
end
|
493
|
-
|
494
|
-
create_table
|
495
|
-
t.string
|
496
|
-
t.integer
|
497
|
-
t.integer
|
498
|
-
t.datetime
|
499
|
-
t.datetime
|
500
|
-
t.index [
|
501
|
-
t.index [
|
502
|
-
t.index [
|
503
|
-
end
|
504
|
-
|
505
|
-
create_table
|
506
|
-
t.string
|
507
|
-
t.string
|
508
|
-
t.string
|
509
|
-
t.integer
|
510
|
-
t.datetime
|
511
|
-
t.datetime
|
512
|
-
t.index [
|
513
|
-
t.index [
|
514
|
-
end
|
515
|
-
|
516
|
-
create_table
|
517
|
-
t.string
|
518
|
-
t.string
|
519
|
-
t.string
|
520
|
-
t.integer
|
521
|
-
t.datetime
|
522
|
-
t.datetime
|
523
|
-
t.index [
|
524
|
-
t.index [
|
525
|
-
end
|
526
|
-
|
527
|
-
create_table
|
528
|
-
t.integer
|
529
|
-
t.integer
|
530
|
-
t.datetime
|
531
|
-
t.datetime
|
532
|
-
t.index [
|
533
|
-
t.index [
|
534
|
-
end
|
535
|
-
|
536
|
-
create_table
|
537
|
-
t.string
|
538
|
-
t.string
|
539
|
-
t.datetime
|
540
|
-
t.datetime
|
541
|
-
t.datetime
|
542
|
-
t.integer
|
543
|
-
t.boolean
|
544
|
-
t.text
|
545
|
-
t.string
|
546
|
-
t.integer
|
547
|
-
t.integer
|
548
|
-
t.integer
|
549
|
-
t.integer
|
550
|
-
t.datetime
|
551
|
-
t.integer
|
552
|
-
t.integer
|
553
|
-
t.integer
|
554
|
-
t.integer
|
555
|
-
t.string
|
556
|
-
t.string
|
557
|
-
t.datetime
|
558
|
-
t.integer
|
559
|
-
t.index [
|
560
|
-
t.index [
|
561
|
-
t.index [
|
562
|
-
t.index [
|
563
|
-
t.index [
|
564
|
-
t.index [
|
565
|
-
t.index [
|
566
|
-
t.index [
|
567
|
-
end
|
568
|
-
|
569
|
-
create_table
|
570
|
-
t.string
|
571
|
-
t.string
|
572
|
-
t.text
|
573
|
-
t.string
|
574
|
-
t.string
|
575
|
-
t.string
|
576
|
-
t.text
|
577
|
-
t.integer
|
578
|
-
t.index [
|
579
|
-
t.index [
|
580
|
-
t.index [
|
581
|
-
t.index [
|
582
|
-
end
|
583
|
-
|
584
|
-
create_table
|
585
|
-
t.integer
|
586
|
-
t.integer
|
587
|
-
t.integer
|
588
|
-
t.datetime
|
589
|
-
t.integer
|
590
|
-
t.integer
|
591
|
-
t.text
|
592
|
-
t.integer
|
593
|
-
t.datetime
|
594
|
-
t.datetime
|
595
|
-
t.index
|
596
|
-
end
|
597
|
-
|
598
|
-
create_table
|
599
|
-
t.string
|
600
|
-
t.text
|
601
|
-
t.string
|
602
|
-
t.string
|
603
|
-
t.text
|
604
|
-
t.text
|
605
|
-
t.text
|
606
|
-
t.string
|
607
|
-
t.string
|
608
|
-
t.string
|
609
|
-
t.text
|
610
|
-
t.integer
|
611
|
-
t.string
|
612
|
-
t.integer
|
613
|
-
t.integer
|
614
|
-
t.integer
|
615
|
-
t.integer
|
616
|
-
t.datetime
|
617
|
-
t.datetime
|
618
|
-
t.datetime
|
619
|
-
t.text
|
620
|
-
t.string
|
621
|
-
t.float
|
622
|
-
t.float
|
623
|
-
t.index [
|
624
|
-
t.index [
|
625
|
-
end
|
626
|
-
|
627
|
-
create_table
|
628
|
-
t.string
|
629
|
-
t.text
|
630
|
-
t.string
|
631
|
-
t.text
|
632
|
-
t.text
|
633
|
-
t.text
|
634
|
-
t.integer
|
635
|
-
t.integer
|
636
|
-
t.datetime
|
637
|
-
t.datetime
|
638
|
-
t.text
|
639
|
-
t.string
|
640
|
-
t.jsonb
|
641
|
-
t.jsonb
|
642
|
-
t.text
|
643
|
-
t.
|
644
|
-
t.
|
645
|
-
t.
|
646
|
-
t.
|
647
|
-
t.
|
648
|
-
t.
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
t.
|
655
|
-
t.
|
656
|
-
t.
|
657
|
-
t.
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
t.
|
664
|
-
t.
|
665
|
-
t.
|
666
|
-
t.
|
667
|
-
t.
|
668
|
-
t.
|
669
|
-
t.
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
t.
|
676
|
-
t.datetime
|
677
|
-
t.
|
678
|
-
t.datetime
|
679
|
-
t.datetime
|
680
|
-
t.
|
681
|
-
t.
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
t.
|
688
|
-
t.
|
689
|
-
t.
|
690
|
-
t.
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
t.integer
|
697
|
-
t.
|
698
|
-
t.
|
699
|
-
t.
|
700
|
-
t.
|
701
|
-
t.
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
t.
|
708
|
-
t.
|
709
|
-
t.
|
710
|
-
t.
|
711
|
-
t.
|
712
|
-
t.
|
713
|
-
t.
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
t.
|
720
|
-
t.datetime
|
721
|
-
t.
|
722
|
-
t.datetime
|
723
|
-
t.datetime
|
724
|
-
t.
|
725
|
-
t.
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
t.text
|
732
|
-
t.
|
733
|
-
t.
|
734
|
-
t.
|
735
|
-
t.
|
736
|
-
t.datetime
|
737
|
-
t.datetime
|
738
|
-
t.datetime
|
739
|
-
t.
|
740
|
-
t.
|
741
|
-
t.
|
742
|
-
t.integer
|
743
|
-
t.integer
|
744
|
-
t.integer
|
745
|
-
t.integer
|
746
|
-
t.integer
|
747
|
-
t.integer
|
748
|
-
t.
|
749
|
-
t.
|
750
|
-
t.
|
751
|
-
t.string
|
752
|
-
t.
|
753
|
-
t.
|
754
|
-
t.
|
755
|
-
t.
|
756
|
-
t.
|
757
|
-
t.integer
|
758
|
-
t.integer
|
759
|
-
t.
|
760
|
-
t.
|
761
|
-
t.
|
762
|
-
t.
|
763
|
-
t.
|
764
|
-
t.
|
765
|
-
t.
|
766
|
-
t.text
|
767
|
-
t.
|
768
|
-
t.
|
769
|
-
t.datetime
|
770
|
-
t.datetime
|
771
|
-
t.datetime
|
772
|
-
t.
|
773
|
-
t.
|
774
|
-
t.
|
775
|
-
t.
|
776
|
-
t.integer
|
777
|
-
t.integer
|
778
|
-
t.integer
|
779
|
-
t.
|
780
|
-
t.integer
|
781
|
-
t.
|
782
|
-
t.
|
783
|
-
t.
|
784
|
-
t.
|
785
|
-
t.text
|
786
|
-
t.text
|
787
|
-
t.
|
788
|
-
t.
|
789
|
-
t.
|
790
|
-
t.
|
791
|
-
t.
|
792
|
-
t.index [
|
793
|
-
t.index [
|
794
|
-
t.index [
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
t.
|
801
|
-
t.
|
802
|
-
t.
|
803
|
-
t.
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
t.
|
810
|
-
t.
|
811
|
-
t.
|
812
|
-
t.
|
813
|
-
t.
|
814
|
-
t.
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
t.integer
|
821
|
-
t.
|
822
|
-
t.
|
823
|
-
t.
|
824
|
-
t.datetime
|
825
|
-
t.
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
t.
|
832
|
-
t.
|
833
|
-
t.
|
834
|
-
t.
|
835
|
-
t.
|
836
|
-
t.
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
t.
|
843
|
-
t.
|
844
|
-
t.
|
845
|
-
t.
|
846
|
-
t.
|
847
|
-
t.
|
848
|
-
t.
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
t.
|
855
|
-
t.
|
856
|
-
t.
|
857
|
-
t.
|
858
|
-
t.
|
859
|
-
t.
|
860
|
-
t.
|
861
|
-
t.
|
862
|
-
t.
|
863
|
-
t.integer
|
864
|
-
t.
|
865
|
-
t.
|
866
|
-
t.index [
|
867
|
-
t.index [
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
t.integer
|
874
|
-
t.
|
875
|
-
t.
|
876
|
-
t.
|
877
|
-
t.
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
t.
|
884
|
-
t.
|
885
|
-
t.
|
886
|
-
t.
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
t.
|
893
|
-
t.
|
894
|
-
t.string
|
895
|
-
t.
|
896
|
-
t.
|
897
|
-
t.
|
898
|
-
t.
|
899
|
-
t.
|
900
|
-
t.
|
901
|
-
t.
|
902
|
-
t.
|
903
|
-
t.
|
904
|
-
t.
|
905
|
-
t.
|
906
|
-
t.
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
t.
|
914
|
-
t.
|
915
|
-
t.
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
t.
|
923
|
-
t.
|
924
|
-
t.integer
|
925
|
-
t.
|
926
|
-
t.
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
t.
|
934
|
-
t.
|
935
|
-
t.
|
936
|
-
t.
|
937
|
-
t.
|
938
|
-
t.
|
939
|
-
t.
|
940
|
-
t.
|
941
|
-
t.
|
942
|
-
t.
|
943
|
-
t.datetime
|
944
|
-
t.
|
945
|
-
t.
|
946
|
-
t.
|
947
|
-
t.
|
948
|
-
t.
|
949
|
-
t.index [
|
950
|
-
t.index [
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
t.
|
958
|
-
t.
|
959
|
-
t.
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
t.
|
967
|
-
t.
|
968
|
-
t.integer
|
969
|
-
t.
|
970
|
-
t.
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
t.
|
978
|
-
t.
|
979
|
-
t.
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
t.
|
987
|
-
t.
|
988
|
-
t.
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
t.
|
996
|
-
t.
|
997
|
-
t.
|
998
|
-
t.
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
t.
|
1006
|
-
t.
|
1007
|
-
t.
|
1008
|
-
t.
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
t.
|
1016
|
-
t.
|
1017
|
-
t.
|
1018
|
-
t.
|
1019
|
-
t.
|
1020
|
-
t.
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
t.integer
|
1028
|
-
t.
|
1029
|
-
t.
|
1030
|
-
t.
|
1031
|
-
t.datetime
|
1032
|
-
t.datetime
|
1033
|
-
t.datetime
|
1034
|
-
t.
|
1035
|
-
t.
|
1036
|
-
t.
|
1037
|
-
t.
|
1038
|
-
t.
|
1039
|
-
t.integer
|
1040
|
-
t.
|
1041
|
-
t.
|
1042
|
-
t.
|
1043
|
-
t.index [
|
1044
|
-
t.index [
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
t.
|
1052
|
-
t.
|
1053
|
-
t.
|
1054
|
-
t.
|
1055
|
-
t.
|
1056
|
-
t.
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
t.
|
1064
|
-
t.
|
1065
|
-
t.
|
1066
|
-
t.
|
1067
|
-
t.
|
1068
|
-
t.
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
t.
|
1076
|
-
t.
|
1077
|
-
t.
|
1078
|
-
t.
|
1079
|
-
t.
|
1080
|
-
t.
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
t.integer
|
1088
|
-
t.
|
1089
|
-
t.
|
1090
|
-
t.
|
1091
|
-
t.
|
1092
|
-
t.
|
1093
|
-
t.
|
1094
|
-
t.
|
1095
|
-
t.
|
1096
|
-
t.
|
1097
|
-
t.
|
1098
|
-
t.
|
1099
|
-
t.string
|
1100
|
-
t.
|
1101
|
-
t.
|
1102
|
-
t.
|
1103
|
-
t.
|
1104
|
-
t.
|
1105
|
-
t.
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
t.
|
1113
|
-
t.
|
1114
|
-
t.
|
1115
|
-
t.text
|
1116
|
-
t.
|
1117
|
-
t.
|
1118
|
-
t.
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
t.
|
1126
|
-
t.
|
1127
|
-
t.
|
1128
|
-
t.
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
t.
|
1136
|
-
t.text
|
1137
|
-
t.
|
1138
|
-
t.text
|
1139
|
-
t.text
|
1140
|
-
t.
|
1141
|
-
t.
|
1142
|
-
t.
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
t.
|
1156
|
-
t.
|
1157
|
-
t.
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
t.text
|
1165
|
-
t.
|
1166
|
-
t.
|
1167
|
-
t.
|
1168
|
-
t.
|
1169
|
-
t.
|
1170
|
-
t.
|
1171
|
-
t.
|
1172
|
-
t.text
|
1173
|
-
t.
|
1174
|
-
t.
|
1175
|
-
t.text
|
1176
|
-
t.text
|
1177
|
-
t.
|
1178
|
-
t.
|
1179
|
-
t.
|
1180
|
-
t.
|
1181
|
-
t.
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
t.
|
1189
|
-
t.
|
1190
|
-
t.
|
1191
|
-
t.
|
1192
|
-
t.
|
1193
|
-
t.
|
1194
|
-
t.
|
1195
|
-
t.
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
t.
|
1203
|
-
t.
|
1204
|
-
t.datetime
|
1205
|
-
t.
|
1206
|
-
t.
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
t.
|
1214
|
-
t.
|
1215
|
-
t.integer
|
1216
|
-
t.
|
1217
|
-
t.datetime
|
1218
|
-
t.
|
1219
|
-
t.
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
t.
|
1227
|
-
t.
|
1228
|
-
t.
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
t.
|
1236
|
-
t.
|
1237
|
-
t.
|
1238
|
-
t.
|
1239
|
-
t.
|
1240
|
-
t.
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
t.datetime
|
1248
|
-
t.datetime
|
1249
|
-
t.
|
1250
|
-
t.datetime
|
1251
|
-
t.
|
1252
|
-
t.
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
t.
|
1260
|
-
t.
|
1261
|
-
t.
|
1262
|
-
t.
|
1263
|
-
t.
|
1264
|
-
t.
|
1265
|
-
t.
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
t.
|
1273
|
-
t.
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
t.
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
t.integer
|
1282
|
-
t.integer
|
1283
|
-
t.integer
|
1284
|
-
t.
|
1285
|
-
t.
|
1286
|
-
t.
|
1287
|
-
t.integer
|
1288
|
-
t.
|
1289
|
-
t.datetime
|
1290
|
-
t.
|
1291
|
-
t.
|
1292
|
-
t.
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
t.
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
t.
|
1301
|
-
t.
|
1302
|
-
t.
|
1303
|
-
t.integer
|
1304
|
-
t.datetime
|
1305
|
-
t.
|
1306
|
-
t.
|
1307
|
-
t.integer
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
t.integer
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
t.
|
1316
|
-
t.
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
t.
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
t.
|
1325
|
-
t.
|
1326
|
-
t.
|
1327
|
-
t.
|
1328
|
-
t.
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
t.
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
t.
|
1337
|
-
t.
|
1338
|
-
t.datetime
|
1339
|
-
t.string
|
1340
|
-
t.string
|
1341
|
-
t.
|
1342
|
-
t.datetime
|
1343
|
-
t.
|
1344
|
-
t.string
|
1345
|
-
t.
|
1346
|
-
t.
|
1347
|
-
t.
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
t.
|
1352
|
-
t.
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
t.
|
1357
|
-
t.
|
1358
|
-
t.
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
t.
|
1363
|
-
t.
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
t.
|
1368
|
-
t.
|
1369
|
-
t.
|
1370
|
-
t.
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
t.
|
1375
|
-
t.
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
t.datetime
|
1380
|
-
t.datetime
|
1381
|
-
t.
|
1382
|
-
t.
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1386
|
-
t.
|
1387
|
-
t.
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
t.
|
1392
|
-
t.
|
1393
|
-
t.
|
1394
|
-
t.
|
1395
|
-
t.
|
1396
|
-
t.
|
1397
|
-
t.datetime
|
1398
|
-
t.
|
1399
|
-
t.
|
1400
|
-
t.
|
1401
|
-
t.
|
1402
|
-
t.
|
1403
|
-
t.
|
1404
|
-
t.datetime
|
1405
|
-
t.
|
1406
|
-
t.
|
1407
|
-
t.
|
1408
|
-
t.
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
t.
|
1413
|
-
t.
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
t.
|
1418
|
-
t.
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
add_foreign_key
|
1427
|
-
add_foreign_key
|
1428
|
-
add_foreign_key
|
1429
|
-
add_foreign_key
|
1430
|
-
add_foreign_key
|
16
|
+
enable_extension "plpgsql"
|
17
|
+
|
18
|
+
create_table "accepts", force: :cascade do |t|
|
19
|
+
t.integer "basket_id"
|
20
|
+
t.integer "item_id"
|
21
|
+
t.integer "librarian_id"
|
22
|
+
t.datetime "created_at"
|
23
|
+
t.datetime "updated_at"
|
24
|
+
t.index ["basket_id"], name: "index_accepts_on_basket_id", using: :btree
|
25
|
+
t.index ["item_id"], name: "index_accepts_on_item_id", using: :btree
|
26
|
+
end
|
27
|
+
|
28
|
+
create_table "agent_import_file_transitions", force: :cascade do |t|
|
29
|
+
t.string "to_state"
|
30
|
+
t.jsonb "metadata", default: "{}"
|
31
|
+
t.integer "sort_key"
|
32
|
+
t.integer "agent_import_file_id"
|
33
|
+
t.datetime "created_at"
|
34
|
+
t.datetime "updated_at"
|
35
|
+
t.boolean "most_recent"
|
36
|
+
t.index ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id", using: :btree
|
37
|
+
t.index ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true, using: :btree
|
38
|
+
end
|
39
|
+
|
40
|
+
create_table "agent_import_files", force: :cascade do |t|
|
41
|
+
t.integer "parent_id"
|
42
|
+
t.string "content_type"
|
43
|
+
t.integer "size"
|
44
|
+
t.integer "user_id"
|
45
|
+
t.text "note"
|
46
|
+
t.datetime "executed_at"
|
47
|
+
t.string "agent_import_file_name"
|
48
|
+
t.string "agent_import_content_type"
|
49
|
+
t.integer "agent_import_size"
|
50
|
+
t.datetime "agent_import_updated_at"
|
51
|
+
t.datetime "created_at"
|
52
|
+
t.datetime "updated_at"
|
53
|
+
t.string "agent_import_fingerprint"
|
54
|
+
t.text "error_message"
|
55
|
+
t.string "edit_mode"
|
56
|
+
t.string "user_encoding"
|
57
|
+
t.string "agent_import_id"
|
58
|
+
t.jsonb "attachment_data"
|
59
|
+
t.index ["agent_import_id"], name: "index_agent_import_files_on_agent_import_id", using: :btree
|
60
|
+
t.index ["parent_id"], name: "index_agent_import_files_on_parent_id", using: :btree
|
61
|
+
t.index ["user_id"], name: "index_agent_import_files_on_user_id", using: :btree
|
62
|
+
end
|
63
|
+
|
64
|
+
create_table "agent_import_results", force: :cascade do |t|
|
65
|
+
t.integer "agent_import_file_id"
|
66
|
+
t.integer "agent_id"
|
67
|
+
t.text "body"
|
68
|
+
t.datetime "created_at"
|
69
|
+
t.datetime "updated_at"
|
70
|
+
end
|
71
|
+
|
72
|
+
create_table "agent_merge_lists", force: :cascade do |t|
|
73
|
+
t.string "title"
|
74
|
+
t.datetime "created_at"
|
75
|
+
t.datetime "updated_at"
|
76
|
+
end
|
77
|
+
|
78
|
+
create_table "agent_merges", force: :cascade do |t|
|
79
|
+
t.integer "agent_id", null: false
|
80
|
+
t.integer "agent_merge_list_id", null: false
|
81
|
+
t.datetime "created_at"
|
82
|
+
t.datetime "updated_at"
|
83
|
+
t.index ["agent_id"], name: "index_agent_merges_on_agent_id", using: :btree
|
84
|
+
t.index ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id", using: :btree
|
85
|
+
end
|
86
|
+
|
87
|
+
create_table "agent_names", force: :cascade do |t|
|
88
|
+
t.string "first_name"
|
89
|
+
t.string "middle_name"
|
90
|
+
t.string "last_name"
|
91
|
+
t.string "full_name"
|
92
|
+
t.integer "language_id"
|
93
|
+
t.integer "agent_id"
|
94
|
+
t.integer "profile_id"
|
95
|
+
t.integer "position"
|
96
|
+
t.string "source"
|
97
|
+
t.string "name_type"
|
98
|
+
t.datetime "created_at", null: false
|
99
|
+
t.datetime "updated_at", null: false
|
100
|
+
t.index ["agent_id"], name: "index_agent_names_on_agent_id", using: :btree
|
101
|
+
t.index ["full_name"], name: "index_agent_names_on_full_name", using: :btree
|
102
|
+
t.index ["language_id"], name: "index_agent_names_on_language_id", using: :btree
|
103
|
+
t.index ["profile_id"], name: "index_agent_names_on_profile_id", using: :btree
|
104
|
+
end
|
105
|
+
|
106
|
+
create_table "agent_relationship_types", force: :cascade do |t|
|
107
|
+
t.string "name", null: false
|
108
|
+
t.text "display_name"
|
109
|
+
t.text "note"
|
110
|
+
t.integer "position"
|
111
|
+
t.datetime "created_at"
|
112
|
+
t.datetime "updated_at"
|
113
|
+
end
|
114
|
+
|
115
|
+
create_table "agent_relationships", force: :cascade do |t|
|
116
|
+
t.integer "parent_id"
|
117
|
+
t.integer "child_id"
|
118
|
+
t.integer "agent_relationship_type_id"
|
119
|
+
t.datetime "created_at"
|
120
|
+
t.datetime "updated_at"
|
121
|
+
t.integer "position"
|
122
|
+
t.index ["child_id"], name: "index_agent_relationships_on_child_id", using: :btree
|
123
|
+
t.index ["parent_id"], name: "index_agent_relationships_on_parent_id", using: :btree
|
124
|
+
end
|
125
|
+
|
126
|
+
create_table "agent_types", force: :cascade do |t|
|
127
|
+
t.string "name", null: false
|
128
|
+
t.text "display_name"
|
129
|
+
t.text "note"
|
130
|
+
t.integer "position"
|
131
|
+
t.datetime "created_at"
|
132
|
+
t.datetime "updated_at"
|
133
|
+
end
|
134
|
+
|
135
|
+
create_table "agents", force: :cascade do |t|
|
136
|
+
t.string "last_name"
|
137
|
+
t.string "middle_name"
|
138
|
+
t.string "first_name"
|
139
|
+
t.string "last_name_transcription"
|
140
|
+
t.string "middle_name_transcription"
|
141
|
+
t.string "first_name_transcription"
|
142
|
+
t.string "corporate_name"
|
143
|
+
t.string "corporate_name_transcription"
|
144
|
+
t.string "full_name"
|
145
|
+
t.text "full_name_transcription"
|
146
|
+
t.text "full_name_alternative"
|
147
|
+
t.datetime "created_at"
|
148
|
+
t.datetime "updated_at"
|
149
|
+
t.datetime "deleted_at"
|
150
|
+
t.string "zip_code_1"
|
151
|
+
t.string "zip_code_2"
|
152
|
+
t.text "address_1"
|
153
|
+
t.text "address_2"
|
154
|
+
t.text "address_1_note"
|
155
|
+
t.text "address_2_note"
|
156
|
+
t.string "telephone_number_1"
|
157
|
+
t.string "telephone_number_2"
|
158
|
+
t.string "fax_number_1"
|
159
|
+
t.string "fax_number_2"
|
160
|
+
t.text "other_designation"
|
161
|
+
t.text "place"
|
162
|
+
t.string "postal_code"
|
163
|
+
t.text "street"
|
164
|
+
t.text "locality"
|
165
|
+
t.text "region"
|
166
|
+
t.datetime "date_of_birth"
|
167
|
+
t.datetime "date_of_death"
|
168
|
+
t.integer "language_id", default: 1, null: false
|
169
|
+
t.integer "country_id", default: 1, null: false
|
170
|
+
t.integer "agent_type_id", default: 1, null: false
|
171
|
+
t.integer "lock_version", default: 0, null: false
|
172
|
+
t.text "note"
|
173
|
+
t.integer "required_role_id", default: 1, null: false
|
174
|
+
t.integer "required_score", default: 0, null: false
|
175
|
+
t.text "email"
|
176
|
+
t.text "url"
|
177
|
+
t.text "full_name_alternative_transcription"
|
178
|
+
t.string "birth_date"
|
179
|
+
t.string "death_date"
|
180
|
+
t.string "agent_identifier"
|
181
|
+
t.integer "profile_id"
|
182
|
+
t.index ["agent_identifier"], name: "index_agents_on_agent_identifier", using: :btree
|
183
|
+
t.index ["country_id"], name: "index_agents_on_country_id", using: :btree
|
184
|
+
t.index ["full_name"], name: "index_agents_on_full_name", using: :btree
|
185
|
+
t.index ["language_id"], name: "index_agents_on_language_id", using: :btree
|
186
|
+
t.index ["profile_id"], name: "index_agents_on_profile_id", using: :btree
|
187
|
+
t.index ["required_role_id"], name: "index_agents_on_required_role_id", using: :btree
|
188
|
+
end
|
189
|
+
|
190
|
+
create_table "baskets", force: :cascade do |t|
|
191
|
+
t.integer "user_id"
|
192
|
+
t.text "note"
|
193
|
+
t.integer "lock_version", default: 0, null: false
|
194
|
+
t.datetime "created_at"
|
195
|
+
t.datetime "updated_at"
|
196
|
+
t.index ["user_id"], name: "index_baskets_on_user_id", using: :btree
|
197
|
+
end
|
198
|
+
|
199
|
+
create_table "bookstores", force: :cascade do |t|
|
200
|
+
t.text "name", null: false
|
201
|
+
t.string "zip_code"
|
202
|
+
t.text "address"
|
203
|
+
t.text "note"
|
204
|
+
t.string "telephone_number"
|
205
|
+
t.string "fax_number"
|
206
|
+
t.string "url"
|
207
|
+
t.integer "position"
|
208
|
+
t.datetime "deleted_at"
|
209
|
+
t.datetime "created_at"
|
210
|
+
t.datetime "updated_at"
|
211
|
+
end
|
212
|
+
|
213
|
+
create_table "budget_types", force: :cascade do |t|
|
214
|
+
t.string "name"
|
215
|
+
t.text "display_name"
|
216
|
+
t.text "note"
|
217
|
+
t.integer "position"
|
218
|
+
t.datetime "created_at"
|
219
|
+
t.datetime "updated_at"
|
220
|
+
end
|
221
|
+
|
222
|
+
create_table "carrier_type_has_checkout_types", force: :cascade do |t|
|
223
|
+
t.integer "carrier_type_id", null: false
|
224
|
+
t.integer "checkout_type_id", null: false
|
225
|
+
t.text "note"
|
226
|
+
t.integer "position"
|
227
|
+
t.datetime "created_at"
|
228
|
+
t.datetime "updated_at"
|
229
|
+
t.index ["carrier_type_id"], name: "index_carrier_type_has_checkout_types_on_m_form_id", using: :btree
|
230
|
+
t.index ["checkout_type_id"], name: "index_carrier_type_has_checkout_types_on_checkout_type_id", using: :btree
|
231
|
+
end
|
232
|
+
|
233
|
+
create_table "carrier_types", force: :cascade do |t|
|
234
|
+
t.string "name", null: false
|
235
|
+
t.text "display_name"
|
236
|
+
t.text "note"
|
237
|
+
t.integer "position"
|
238
|
+
t.datetime "created_at"
|
239
|
+
t.datetime "updated_at"
|
240
|
+
t.string "attachment_id"
|
241
|
+
t.string "attachment_filename"
|
242
|
+
t.integer "attachment_size"
|
243
|
+
t.string "attachment_content_type"
|
244
|
+
t.jsonb "attachment_data"
|
245
|
+
end
|
246
|
+
|
247
|
+
create_table "checked_items", force: :cascade do |t|
|
248
|
+
t.integer "item_id", null: false
|
249
|
+
t.integer "basket_id", null: false
|
250
|
+
t.datetime "due_date", null: false
|
251
|
+
t.datetime "created_at"
|
252
|
+
t.datetime "updated_at"
|
253
|
+
t.integer "librarian_id"
|
254
|
+
t.index ["basket_id"], name: "index_checked_items_on_basket_id", using: :btree
|
255
|
+
t.index ["item_id"], name: "index_checked_items_on_item_id", using: :btree
|
256
|
+
end
|
257
|
+
|
258
|
+
create_table "checkins", force: :cascade do |t|
|
259
|
+
t.integer "item_id", null: false
|
260
|
+
t.integer "librarian_id"
|
261
|
+
t.integer "basket_id"
|
262
|
+
t.datetime "created_at"
|
263
|
+
t.datetime "updated_at"
|
264
|
+
t.integer "lock_version", default: 0, null: false
|
265
|
+
t.index ["basket_id"], name: "index_checkins_on_basket_id", using: :btree
|
266
|
+
t.index ["item_id"], name: "index_checkins_on_item_id", using: :btree
|
267
|
+
t.index ["librarian_id"], name: "index_checkins_on_librarian_id", using: :btree
|
268
|
+
end
|
269
|
+
|
270
|
+
create_table "checkout_stat_has_manifestations", force: :cascade do |t|
|
271
|
+
t.integer "manifestation_checkout_stat_id", null: false
|
272
|
+
t.integer "manifestation_id", null: false
|
273
|
+
t.integer "checkouts_count"
|
274
|
+
t.datetime "created_at"
|
275
|
+
t.datetime "updated_at"
|
276
|
+
t.index ["manifestation_checkout_stat_id"], name: "index_checkout_stat_has_manifestations_on_checkout_stat_id", using: :btree
|
277
|
+
t.index ["manifestation_id"], name: "index_checkout_stat_has_manifestations_on_manifestation_id", using: :btree
|
278
|
+
end
|
279
|
+
|
280
|
+
create_table "checkout_stat_has_users", force: :cascade do |t|
|
281
|
+
t.integer "user_checkout_stat_id", null: false
|
282
|
+
t.integer "user_id", null: false
|
283
|
+
t.integer "checkouts_count", default: 0, null: false
|
284
|
+
t.datetime "created_at"
|
285
|
+
t.datetime "updated_at"
|
286
|
+
t.index ["user_checkout_stat_id"], name: "index_checkout_stat_has_users_on_user_checkout_stat_id", using: :btree
|
287
|
+
t.index ["user_id"], name: "index_checkout_stat_has_users_on_user_id", using: :btree
|
288
|
+
end
|
289
|
+
|
290
|
+
create_table "checkout_types", force: :cascade do |t|
|
291
|
+
t.string "name", null: false
|
292
|
+
t.text "display_name"
|
293
|
+
t.text "note"
|
294
|
+
t.integer "position"
|
295
|
+
t.datetime "created_at"
|
296
|
+
t.datetime "updated_at"
|
297
|
+
t.index ["name"], name: "index_checkout_types_on_name", using: :btree
|
298
|
+
end
|
299
|
+
|
300
|
+
create_table "checkouts", force: :cascade do |t|
|
301
|
+
t.integer "user_id"
|
302
|
+
t.integer "item_id", null: false
|
303
|
+
t.integer "checkin_id"
|
304
|
+
t.integer "librarian_id"
|
305
|
+
t.integer "basket_id"
|
306
|
+
t.datetime "due_date"
|
307
|
+
t.integer "checkout_renewal_count", default: 0, null: false
|
308
|
+
t.integer "lock_version", default: 0, null: false
|
309
|
+
t.datetime "created_at"
|
310
|
+
t.datetime "updated_at"
|
311
|
+
t.integer "shelf_id"
|
312
|
+
t.integer "library_id"
|
313
|
+
t.index ["basket_id"], name: "index_checkouts_on_basket_id", using: :btree
|
314
|
+
t.index ["checkin_id"], name: "index_checkouts_on_checkin_id", using: :btree
|
315
|
+
t.index ["item_id", "basket_id"], name: "index_checkouts_on_item_id_and_basket_id", unique: true, using: :btree
|
316
|
+
t.index ["item_id"], name: "index_checkouts_on_item_id", using: :btree
|
317
|
+
t.index ["librarian_id"], name: "index_checkouts_on_librarian_id", using: :btree
|
318
|
+
t.index ["library_id"], name: "index_checkouts_on_library_id", using: :btree
|
319
|
+
t.index ["shelf_id"], name: "index_checkouts_on_shelf_id", using: :btree
|
320
|
+
t.index ["user_id"], name: "index_checkouts_on_user_id", using: :btree
|
321
|
+
end
|
322
|
+
|
323
|
+
create_table "circulation_statuses", force: :cascade do |t|
|
324
|
+
t.string "name", null: false
|
325
|
+
t.text "display_name"
|
326
|
+
t.text "note"
|
327
|
+
t.integer "position"
|
328
|
+
t.datetime "created_at"
|
329
|
+
t.datetime "updated_at"
|
330
|
+
end
|
331
|
+
|
332
|
+
create_table "colors", force: :cascade do |t|
|
333
|
+
t.integer "library_group_id"
|
334
|
+
t.string "property"
|
335
|
+
t.string "code"
|
336
|
+
t.integer "position"
|
337
|
+
t.datetime "created_at"
|
338
|
+
t.datetime "updated_at"
|
339
|
+
t.index ["library_group_id"], name: "index_colors_on_library_group_id", using: :btree
|
340
|
+
end
|
341
|
+
|
342
|
+
create_table "content_types", force: :cascade do |t|
|
343
|
+
t.string "name", null: false
|
344
|
+
t.text "display_name"
|
345
|
+
t.text "note"
|
346
|
+
t.integer "position"
|
347
|
+
t.datetime "created_at"
|
348
|
+
t.datetime "updated_at"
|
349
|
+
t.string "attachment_id"
|
350
|
+
t.string "attachment_filename"
|
351
|
+
t.integer "attachment_size"
|
352
|
+
t.string "attachment_content_type"
|
353
|
+
t.jsonb "attachment_data"
|
354
|
+
end
|
355
|
+
|
356
|
+
create_table "countries", force: :cascade do |t|
|
357
|
+
t.string "name", null: false
|
358
|
+
t.text "display_name"
|
359
|
+
t.string "alpha_2"
|
360
|
+
t.string "alpha_3"
|
361
|
+
t.string "numeric_3"
|
362
|
+
t.text "note"
|
363
|
+
t.integer "position"
|
364
|
+
t.index ["alpha_2"], name: "index_countries_on_alpha_2", using: :btree
|
365
|
+
t.index ["alpha_3"], name: "index_countries_on_alpha_3", using: :btree
|
366
|
+
t.index ["name"], name: "index_countries_on_name", using: :btree
|
367
|
+
t.index ["numeric_3"], name: "index_countries_on_numeric_3", using: :btree
|
368
|
+
end
|
369
|
+
|
370
|
+
create_table "create_types", force: :cascade do |t|
|
371
|
+
t.string "name"
|
372
|
+
t.text "display_name"
|
373
|
+
t.text "note"
|
374
|
+
t.integer "position"
|
375
|
+
t.datetime "created_at"
|
376
|
+
t.datetime "updated_at"
|
377
|
+
end
|
378
|
+
|
379
|
+
create_table "creates", force: :cascade do |t|
|
380
|
+
t.integer "agent_id", null: false
|
381
|
+
t.integer "work_id", null: false
|
382
|
+
t.integer "position"
|
383
|
+
t.datetime "created_at"
|
384
|
+
t.datetime "updated_at"
|
385
|
+
t.integer "create_type_id"
|
386
|
+
t.index ["agent_id"], name: "index_creates_on_agent_id", using: :btree
|
387
|
+
t.index ["work_id"], name: "index_creates_on_work_id", using: :btree
|
388
|
+
end
|
389
|
+
|
390
|
+
create_table "demands", force: :cascade do |t|
|
391
|
+
t.integer "user_id"
|
392
|
+
t.integer "item_id"
|
393
|
+
t.integer "message_id"
|
394
|
+
t.datetime "created_at", null: false
|
395
|
+
t.datetime "updated_at", null: false
|
396
|
+
t.index ["item_id"], name: "index_demands_on_item_id", using: :btree
|
397
|
+
t.index ["message_id"], name: "index_demands_on_message_id", using: :btree
|
398
|
+
t.index ["user_id"], name: "index_demands_on_user_id", using: :btree
|
399
|
+
end
|
400
|
+
|
401
|
+
create_table "doi_records", force: :cascade do |t|
|
402
|
+
t.string "body", null: false
|
403
|
+
t.string "registration_agency"
|
404
|
+
t.integer "manifestation_id", null: false
|
405
|
+
t.string "source"
|
406
|
+
t.datetime "created_at", null: false
|
407
|
+
t.datetime "updated_at", null: false
|
408
|
+
t.index ["body"], name: "index_doi_records_on_body", using: :btree
|
409
|
+
t.index ["manifestation_id"], name: "index_doi_records_on_manifestation_id", using: :btree
|
410
|
+
end
|
411
|
+
|
412
|
+
create_table "donates", force: :cascade do |t|
|
413
|
+
t.integer "agent_id", null: false
|
414
|
+
t.integer "item_id", null: false
|
415
|
+
t.datetime "created_at"
|
416
|
+
t.datetime "updated_at"
|
417
|
+
t.index ["agent_id"], name: "index_donates_on_agent_id", using: :btree
|
418
|
+
t.index ["item_id"], name: "index_donates_on_item_id", using: :btree
|
419
|
+
end
|
420
|
+
|
421
|
+
create_table "exemplifies", force: :cascade do |t|
|
422
|
+
t.integer "manifestation_id", null: false
|
423
|
+
t.integer "item_id", null: false
|
424
|
+
t.integer "position"
|
425
|
+
t.datetime "created_at"
|
426
|
+
t.datetime "updated_at"
|
427
|
+
t.index ["item_id"], name: "index_exemplifies_on_item_id", unique: true, using: :btree
|
428
|
+
t.index ["manifestation_id"], name: "index_exemplifies_on_manifestation_id", using: :btree
|
429
|
+
end
|
430
|
+
|
431
|
+
create_table "form_of_works", force: :cascade do |t|
|
432
|
+
t.string "name", null: false
|
433
|
+
t.text "display_name"
|
434
|
+
t.text "note"
|
435
|
+
t.integer "position"
|
436
|
+
t.datetime "created_at"
|
437
|
+
t.datetime "updated_at"
|
438
|
+
end
|
439
|
+
|
440
|
+
create_table "frequencies", force: :cascade do |t|
|
441
|
+
t.string "name", null: false
|
442
|
+
t.text "display_name"
|
443
|
+
t.text "note"
|
444
|
+
t.integer "position"
|
445
|
+
t.datetime "created_at"
|
446
|
+
t.datetime "updated_at"
|
447
|
+
end
|
448
|
+
|
449
|
+
create_table "identifier_types", force: :cascade do |t|
|
450
|
+
t.string "name"
|
451
|
+
t.text "display_name"
|
452
|
+
t.text "note"
|
453
|
+
t.integer "position"
|
454
|
+
t.datetime "created_at"
|
455
|
+
t.datetime "updated_at"
|
456
|
+
end
|
457
|
+
|
458
|
+
create_table "identifiers", force: :cascade do |t|
|
459
|
+
t.string "body", null: false
|
460
|
+
t.integer "identifier_type_id", null: false
|
461
|
+
t.integer "manifestation_id"
|
462
|
+
t.boolean "primary"
|
463
|
+
t.integer "position"
|
464
|
+
t.datetime "created_at"
|
465
|
+
t.datetime "updated_at"
|
466
|
+
t.index ["body", "identifier_type_id"], name: "index_identifiers_on_body_and_identifier_type_id", using: :btree
|
467
|
+
t.index ["manifestation_id"], name: "index_identifiers_on_manifestation_id", using: :btree
|
468
|
+
end
|
469
|
+
|
470
|
+
create_table "identities", force: :cascade do |t|
|
471
|
+
t.string "name"
|
472
|
+
t.string "email"
|
473
|
+
t.string "password_digest"
|
474
|
+
t.integer "profile_id"
|
475
|
+
t.datetime "created_at", null: false
|
476
|
+
t.datetime "updated_at", null: false
|
477
|
+
t.string "provider"
|
478
|
+
t.index ["email"], name: "index_identities_on_email", using: :btree
|
479
|
+
t.index ["name"], name: "index_identities_on_name", using: :btree
|
480
|
+
t.index ["profile_id"], name: "index_identities_on_profile_id", using: :btree
|
481
|
+
end
|
482
|
+
|
483
|
+
create_table "import_request_transitions", force: :cascade do |t|
|
484
|
+
t.string "to_state"
|
485
|
+
t.jsonb "metadata", default: "{}"
|
486
|
+
t.integer "sort_key"
|
487
|
+
t.integer "import_request_id"
|
488
|
+
t.datetime "created_at"
|
489
|
+
t.datetime "updated_at"
|
490
|
+
t.boolean "most_recent"
|
491
|
+
t.index ["import_request_id"], name: "index_import_request_transitions_on_import_request_id", using: :btree
|
492
|
+
t.index ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true, using: :btree
|
493
|
+
end
|
494
|
+
|
495
|
+
create_table "import_requests", force: :cascade do |t|
|
496
|
+
t.string "isbn"
|
497
|
+
t.integer "manifestation_id"
|
498
|
+
t.integer "user_id"
|
499
|
+
t.datetime "created_at"
|
500
|
+
t.datetime "updated_at"
|
501
|
+
t.index ["isbn"], name: "index_import_requests_on_isbn", using: :btree
|
502
|
+
t.index ["manifestation_id"], name: "index_import_requests_on_manifestation_id", using: :btree
|
503
|
+
t.index ["user_id"], name: "index_import_requests_on_user_id", using: :btree
|
504
|
+
end
|
505
|
+
|
506
|
+
create_table "isbn_records", force: :cascade do |t|
|
507
|
+
t.string "body", null: false
|
508
|
+
t.string "isbn_type"
|
509
|
+
t.string "source"
|
510
|
+
t.integer "manifestation_id"
|
511
|
+
t.datetime "created_at", null: false
|
512
|
+
t.datetime "updated_at", null: false
|
513
|
+
t.index ["body"], name: "index_isbn_records_on_body", using: :btree
|
514
|
+
t.index ["manifestation_id"], name: "index_isbn_records_on_manifestation_id", using: :btree
|
515
|
+
end
|
516
|
+
|
517
|
+
create_table "issn_records", force: :cascade do |t|
|
518
|
+
t.string "body", null: false
|
519
|
+
t.string "issn_type"
|
520
|
+
t.string "source"
|
521
|
+
t.integer "manifestation_id"
|
522
|
+
t.datetime "created_at", null: false
|
523
|
+
t.datetime "updated_at", null: false
|
524
|
+
t.index ["body"], name: "index_issn_records_on_body", using: :btree
|
525
|
+
t.index ["manifestation_id"], name: "index_issn_records_on_manifestation_id", using: :btree
|
526
|
+
end
|
527
|
+
|
528
|
+
create_table "item_has_use_restrictions", force: :cascade do |t|
|
529
|
+
t.integer "item_id", null: false
|
530
|
+
t.integer "use_restriction_id", null: false
|
531
|
+
t.datetime "created_at"
|
532
|
+
t.datetime "updated_at"
|
533
|
+
t.index ["item_id"], name: "index_item_has_use_restrictions_on_item_id", using: :btree
|
534
|
+
t.index ["use_restriction_id"], name: "index_item_has_use_restrictions_on_use_restriction_id", using: :btree
|
535
|
+
end
|
536
|
+
|
537
|
+
create_table "items", force: :cascade do |t|
|
538
|
+
t.string "call_number"
|
539
|
+
t.string "item_identifier"
|
540
|
+
t.datetime "created_at"
|
541
|
+
t.datetime "updated_at"
|
542
|
+
t.datetime "deleted_at"
|
543
|
+
t.integer "shelf_id", default: 1, null: false
|
544
|
+
t.boolean "include_supplements", default: false, null: false
|
545
|
+
t.text "note"
|
546
|
+
t.string "url"
|
547
|
+
t.integer "price"
|
548
|
+
t.integer "lock_version", default: 0, null: false
|
549
|
+
t.integer "required_role_id", default: 1, null: false
|
550
|
+
t.integer "required_score", default: 0, null: false
|
551
|
+
t.datetime "acquired_at"
|
552
|
+
t.integer "bookstore_id"
|
553
|
+
t.integer "budget_type_id"
|
554
|
+
t.integer "circulation_status_id", default: 5, null: false
|
555
|
+
t.integer "checkout_type_id", default: 1, null: false
|
556
|
+
t.string "binding_item_identifier"
|
557
|
+
t.string "binding_call_number"
|
558
|
+
t.datetime "binded_at"
|
559
|
+
t.integer "manifestation_id"
|
560
|
+
t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier", using: :btree
|
561
|
+
t.index ["bookstore_id"], name: "index_items_on_bookstore_id", using: :btree
|
562
|
+
t.index ["checkout_type_id"], name: "index_items_on_checkout_type_id", using: :btree
|
563
|
+
t.index ["circulation_status_id"], name: "index_items_on_circulation_status_id", using: :btree
|
564
|
+
t.index ["item_identifier"], name: "index_items_on_item_identifier", using: :btree
|
565
|
+
t.index ["manifestation_id"], name: "index_items_on_manifestation_id", using: :btree
|
566
|
+
t.index ["required_role_id"], name: "index_items_on_required_role_id", using: :btree
|
567
|
+
t.index ["shelf_id"], name: "index_items_on_shelf_id", using: :btree
|
568
|
+
end
|
569
|
+
|
570
|
+
create_table "languages", force: :cascade do |t|
|
571
|
+
t.string "name", null: false
|
572
|
+
t.string "native_name"
|
573
|
+
t.text "display_name"
|
574
|
+
t.string "iso_639_1"
|
575
|
+
t.string "iso_639_2"
|
576
|
+
t.string "iso_639_3"
|
577
|
+
t.text "note"
|
578
|
+
t.integer "position"
|
579
|
+
t.index ["iso_639_1"], name: "index_languages_on_iso_639_1", using: :btree
|
580
|
+
t.index ["iso_639_2"], name: "index_languages_on_iso_639_2", using: :btree
|
581
|
+
t.index ["iso_639_3"], name: "index_languages_on_iso_639_3", using: :btree
|
582
|
+
t.index ["name"], name: "index_languages_on_name", unique: true, using: :btree
|
583
|
+
end
|
584
|
+
|
585
|
+
create_table "lending_policies", force: :cascade do |t|
|
586
|
+
t.integer "item_id", null: false
|
587
|
+
t.integer "user_group_id", null: false
|
588
|
+
t.integer "loan_period", default: 0, null: false
|
589
|
+
t.datetime "fixed_due_date"
|
590
|
+
t.integer "renewal", default: 0, null: false
|
591
|
+
t.integer "fine", default: 0, null: false
|
592
|
+
t.text "note"
|
593
|
+
t.integer "position"
|
594
|
+
t.datetime "created_at"
|
595
|
+
t.datetime "updated_at"
|
596
|
+
t.index ["item_id", "user_group_id"], name: "index_lending_policies_on_item_id_and_user_group_id", unique: true, using: :btree
|
597
|
+
end
|
598
|
+
|
599
|
+
create_table "libraries", force: :cascade do |t|
|
600
|
+
t.string "name", null: false
|
601
|
+
t.text "display_name"
|
602
|
+
t.string "short_display_name", null: false
|
603
|
+
t.string "zip_code"
|
604
|
+
t.text "street"
|
605
|
+
t.text "locality"
|
606
|
+
t.text "region"
|
607
|
+
t.string "telephone_number_1"
|
608
|
+
t.string "telephone_number_2"
|
609
|
+
t.string "fax_number"
|
610
|
+
t.text "note"
|
611
|
+
t.integer "call_number_rows", default: 1, null: false
|
612
|
+
t.string "call_number_delimiter", default: "|", null: false
|
613
|
+
t.integer "library_group_id", default: 1, null: false
|
614
|
+
t.integer "users_count", default: 0, null: false
|
615
|
+
t.integer "position"
|
616
|
+
t.integer "country_id"
|
617
|
+
t.datetime "created_at"
|
618
|
+
t.datetime "updated_at"
|
619
|
+
t.datetime "deleted_at"
|
620
|
+
t.text "opening_hour"
|
621
|
+
t.string "isil"
|
622
|
+
t.float "latitude"
|
623
|
+
t.float "longitude"
|
624
|
+
t.index ["library_group_id"], name: "index_libraries_on_library_group_id", using: :btree
|
625
|
+
t.index ["name"], name: "index_libraries_on_name", unique: true, using: :btree
|
626
|
+
end
|
627
|
+
|
628
|
+
create_table "library_groups", force: :cascade do |t|
|
629
|
+
t.string "name", null: false
|
630
|
+
t.text "display_name"
|
631
|
+
t.string "short_name", null: false
|
632
|
+
t.text "my_networks"
|
633
|
+
t.text "login_banner"
|
634
|
+
t.text "note"
|
635
|
+
t.integer "country_id"
|
636
|
+
t.integer "position"
|
637
|
+
t.datetime "created_at"
|
638
|
+
t.datetime "updated_at"
|
639
|
+
t.text "admin_networks"
|
640
|
+
t.string "url", default: "http://localhost:3000/"
|
641
|
+
t.jsonb "settings"
|
642
|
+
t.jsonb "footer_banner"
|
643
|
+
t.text "html_snippet"
|
644
|
+
t.string "book_jacket_source"
|
645
|
+
t.integer "max_number_of_results", default: 500
|
646
|
+
t.boolean "family_name_first", default: true
|
647
|
+
t.string "screenshot_generator"
|
648
|
+
t.integer "pub_year_facet_range_interval", default: 10
|
649
|
+
t.integer "user_id"
|
650
|
+
t.index ["short_name"], name: "index_library_groups_on_short_name", using: :btree
|
651
|
+
t.index ["user_id"], name: "index_library_groups_on_user_id", using: :btree
|
652
|
+
end
|
653
|
+
|
654
|
+
create_table "licenses", force: :cascade do |t|
|
655
|
+
t.string "name", null: false
|
656
|
+
t.string "display_name"
|
657
|
+
t.text "note"
|
658
|
+
t.integer "position"
|
659
|
+
t.datetime "created_at"
|
660
|
+
t.datetime "updated_at"
|
661
|
+
end
|
662
|
+
|
663
|
+
create_table "manifestation_checkout_stat_transitions", force: :cascade do |t|
|
664
|
+
t.string "to_state"
|
665
|
+
t.text "metadata", default: "{}"
|
666
|
+
t.integer "sort_key"
|
667
|
+
t.integer "manifestation_checkout_stat_id"
|
668
|
+
t.datetime "created_at"
|
669
|
+
t.datetime "updated_at"
|
670
|
+
t.boolean "most_recent"
|
671
|
+
t.index ["manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_stat_id", using: :btree
|
672
|
+
t.index ["sort_key", "manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_transition", unique: true, using: :btree
|
673
|
+
end
|
674
|
+
|
675
|
+
create_table "manifestation_checkout_stats", force: :cascade do |t|
|
676
|
+
t.datetime "start_date"
|
677
|
+
t.datetime "end_date"
|
678
|
+
t.text "note"
|
679
|
+
t.datetime "created_at"
|
680
|
+
t.datetime "updated_at"
|
681
|
+
t.datetime "started_at"
|
682
|
+
t.datetime "completed_at"
|
683
|
+
t.integer "user_id"
|
684
|
+
t.index ["user_id"], name: "index_manifestation_checkout_stats_on_user_id", using: :btree
|
685
|
+
end
|
686
|
+
|
687
|
+
create_table "manifestation_relationship_types", force: :cascade do |t|
|
688
|
+
t.string "name", null: false
|
689
|
+
t.text "display_name"
|
690
|
+
t.text "note"
|
691
|
+
t.integer "position"
|
692
|
+
t.datetime "created_at"
|
693
|
+
t.datetime "updated_at"
|
694
|
+
end
|
695
|
+
|
696
|
+
create_table "manifestation_relationships", force: :cascade do |t|
|
697
|
+
t.integer "parent_id"
|
698
|
+
t.integer "child_id"
|
699
|
+
t.integer "manifestation_relationship_type_id"
|
700
|
+
t.datetime "created_at"
|
701
|
+
t.datetime "updated_at"
|
702
|
+
t.integer "position"
|
703
|
+
t.index ["child_id"], name: "index_manifestation_relationships_on_child_id", using: :btree
|
704
|
+
t.index ["parent_id"], name: "index_manifestation_relationships_on_parent_id", using: :btree
|
705
|
+
end
|
706
|
+
|
707
|
+
create_table "manifestation_reserve_stat_transitions", force: :cascade do |t|
|
708
|
+
t.string "to_state"
|
709
|
+
t.text "metadata", default: "{}"
|
710
|
+
t.integer "sort_key"
|
711
|
+
t.integer "manifestation_reserve_stat_id"
|
712
|
+
t.datetime "created_at"
|
713
|
+
t.datetime "updated_at"
|
714
|
+
t.boolean "most_recent"
|
715
|
+
t.index ["manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_stat_id", using: :btree
|
716
|
+
t.index ["sort_key", "manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_transition", unique: true, using: :btree
|
717
|
+
end
|
718
|
+
|
719
|
+
create_table "manifestation_reserve_stats", force: :cascade do |t|
|
720
|
+
t.datetime "start_date"
|
721
|
+
t.datetime "end_date"
|
722
|
+
t.text "note"
|
723
|
+
t.datetime "created_at"
|
724
|
+
t.datetime "updated_at"
|
725
|
+
t.datetime "started_at"
|
726
|
+
t.datetime "completed_at"
|
727
|
+
t.integer "user_id"
|
728
|
+
t.index ["user_id"], name: "index_manifestation_reserve_stats_on_user_id", using: :btree
|
729
|
+
end
|
730
|
+
|
731
|
+
create_table "manifestations", force: :cascade do |t|
|
732
|
+
t.text "original_title", null: false
|
733
|
+
t.text "title_alternative"
|
734
|
+
t.text "title_transcription"
|
735
|
+
t.string "classification_number"
|
736
|
+
t.string "manifestation_identifier"
|
737
|
+
t.datetime "date_of_publication"
|
738
|
+
t.datetime "date_copyrighted"
|
739
|
+
t.datetime "created_at"
|
740
|
+
t.datetime "updated_at"
|
741
|
+
t.datetime "deleted_at"
|
742
|
+
t.string "access_address"
|
743
|
+
t.integer "language_id", default: 1, null: false
|
744
|
+
t.integer "carrier_type_id", default: 1, null: false
|
745
|
+
t.integer "start_page"
|
746
|
+
t.integer "end_page"
|
747
|
+
t.integer "height"
|
748
|
+
t.integer "width"
|
749
|
+
t.integer "depth"
|
750
|
+
t.integer "price"
|
751
|
+
t.text "fulltext"
|
752
|
+
t.string "volume_number_string"
|
753
|
+
t.string "issue_number_string"
|
754
|
+
t.string "serial_number_string"
|
755
|
+
t.integer "edition"
|
756
|
+
t.text "note"
|
757
|
+
t.boolean "repository_content", default: false, null: false
|
758
|
+
t.integer "lock_version", default: 0, null: false
|
759
|
+
t.integer "required_role_id", default: 1, null: false
|
760
|
+
t.integer "required_score", default: 0, null: false
|
761
|
+
t.integer "frequency_id", default: 1, null: false
|
762
|
+
t.boolean "subscription_master", default: false, null: false
|
763
|
+
t.string "attachment_file_name"
|
764
|
+
t.string "attachment_content_type"
|
765
|
+
t.integer "attachment_size"
|
766
|
+
t.datetime "attachment_updated_at"
|
767
|
+
t.text "title_alternative_transcription"
|
768
|
+
t.text "description"
|
769
|
+
t.text "abstract"
|
770
|
+
t.datetime "available_at"
|
771
|
+
t.datetime "valid_until"
|
772
|
+
t.datetime "date_submitted"
|
773
|
+
t.datetime "date_accepted"
|
774
|
+
t.datetime "date_captured"
|
775
|
+
t.string "pub_date"
|
776
|
+
t.string "edition_string"
|
777
|
+
t.integer "volume_number"
|
778
|
+
t.integer "issue_number"
|
779
|
+
t.integer "serial_number"
|
780
|
+
t.integer "content_type_id", default: 1
|
781
|
+
t.integer "year_of_publication"
|
782
|
+
t.text "attachment_meta"
|
783
|
+
t.integer "month_of_publication"
|
784
|
+
t.boolean "fulltext_content"
|
785
|
+
t.boolean "serial"
|
786
|
+
t.text "statement_of_responsibility"
|
787
|
+
t.text "publication_place"
|
788
|
+
t.text "extent"
|
789
|
+
t.text "dimensions"
|
790
|
+
t.string "attachment_id"
|
791
|
+
t.string "attachment_fingerprint"
|
792
|
+
t.jsonb "attachment_data"
|
793
|
+
t.index ["access_address"], name: "index_manifestations_on_access_address", using: :btree
|
794
|
+
t.index ["attachment_id"], name: "index_manifestations_on_attachment_id", using: :btree
|
795
|
+
t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication", using: :btree
|
796
|
+
t.index ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier", using: :btree
|
797
|
+
t.index ["updated_at"], name: "index_manifestations_on_updated_at", using: :btree
|
798
|
+
end
|
799
|
+
|
800
|
+
create_table "medium_of_performances", force: :cascade do |t|
|
801
|
+
t.string "name", null: false
|
802
|
+
t.text "display_name"
|
803
|
+
t.text "note"
|
804
|
+
t.integer "position"
|
805
|
+
t.datetime "created_at"
|
806
|
+
t.datetime "updated_at"
|
807
|
+
end
|
808
|
+
|
809
|
+
create_table "message_request_transitions", force: :cascade do |t|
|
810
|
+
t.string "to_state"
|
811
|
+
t.text "metadata", default: "{}"
|
812
|
+
t.integer "sort_key"
|
813
|
+
t.integer "message_request_id"
|
814
|
+
t.datetime "created_at"
|
815
|
+
t.datetime "updated_at"
|
816
|
+
t.index ["message_request_id"], name: "index_message_request_transitions_on_message_request_id", using: :btree
|
817
|
+
t.index ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true, using: :btree
|
818
|
+
end
|
819
|
+
|
820
|
+
create_table "message_requests", force: :cascade do |t|
|
821
|
+
t.integer "sender_id"
|
822
|
+
t.integer "receiver_id"
|
823
|
+
t.integer "message_template_id"
|
824
|
+
t.datetime "sent_at"
|
825
|
+
t.datetime "deleted_at"
|
826
|
+
t.text "body"
|
827
|
+
t.datetime "created_at"
|
828
|
+
t.datetime "updated_at"
|
829
|
+
end
|
830
|
+
|
831
|
+
create_table "message_templates", force: :cascade do |t|
|
832
|
+
t.string "status", null: false
|
833
|
+
t.text "title", null: false
|
834
|
+
t.text "body", null: false
|
835
|
+
t.integer "position"
|
836
|
+
t.string "locale", default: "en"
|
837
|
+
t.datetime "created_at"
|
838
|
+
t.datetime "updated_at"
|
839
|
+
t.index ["status"], name: "index_message_templates_on_status", unique: true, using: :btree
|
840
|
+
end
|
841
|
+
|
842
|
+
create_table "message_transitions", force: :cascade do |t|
|
843
|
+
t.string "to_state"
|
844
|
+
t.text "metadata", default: "{}"
|
845
|
+
t.integer "sort_key"
|
846
|
+
t.integer "message_id"
|
847
|
+
t.datetime "created_at"
|
848
|
+
t.datetime "updated_at"
|
849
|
+
t.boolean "most_recent"
|
850
|
+
t.index ["message_id"], name: "index_message_transitions_on_message_id", using: :btree
|
851
|
+
t.index ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true, using: :btree
|
852
|
+
end
|
853
|
+
|
854
|
+
create_table "messages", force: :cascade do |t|
|
855
|
+
t.datetime "read_at"
|
856
|
+
t.integer "receiver_id"
|
857
|
+
t.integer "sender_id"
|
858
|
+
t.string "subject", null: false
|
859
|
+
t.text "body"
|
860
|
+
t.integer "message_request_id"
|
861
|
+
t.integer "parent_id"
|
862
|
+
t.datetime "created_at"
|
863
|
+
t.datetime "updated_at"
|
864
|
+
t.integer "lft"
|
865
|
+
t.integer "rgt"
|
866
|
+
t.integer "depth"
|
867
|
+
t.index ["message_request_id"], name: "index_messages_on_message_request_id", using: :btree
|
868
|
+
t.index ["parent_id"], name: "index_messages_on_parent_id", using: :btree
|
869
|
+
t.index ["receiver_id"], name: "index_messages_on_receiver_id", using: :btree
|
870
|
+
t.index ["sender_id"], name: "index_messages_on_sender_id", using: :btree
|
871
|
+
end
|
872
|
+
|
873
|
+
create_table "owns", force: :cascade do |t|
|
874
|
+
t.integer "agent_id", null: false
|
875
|
+
t.integer "item_id", null: false
|
876
|
+
t.integer "position"
|
877
|
+
t.datetime "created_at"
|
878
|
+
t.datetime "updated_at"
|
879
|
+
t.index ["agent_id"], name: "index_owns_on_agent_id", using: :btree
|
880
|
+
t.index ["item_id"], name: "index_owns_on_item_id", using: :btree
|
881
|
+
end
|
882
|
+
|
883
|
+
create_table "periodicals", force: :cascade do |t|
|
884
|
+
t.text "original_title"
|
885
|
+
t.string "periodical_type"
|
886
|
+
t.integer "manifestation_id"
|
887
|
+
t.datetime "created_at"
|
888
|
+
t.datetime "updated_at"
|
889
|
+
t.index ["manifestation_id"], name: "index_periodicals_on_manifestation_id", using: :btree
|
890
|
+
end
|
891
|
+
|
892
|
+
create_table "picture_files", force: :cascade do |t|
|
893
|
+
t.integer "picture_attachable_id"
|
894
|
+
t.string "picture_attachable_type"
|
895
|
+
t.string "content_type"
|
896
|
+
t.text "title"
|
897
|
+
t.string "thumbnail"
|
898
|
+
t.integer "position"
|
899
|
+
t.datetime "created_at"
|
900
|
+
t.datetime "updated_at"
|
901
|
+
t.string "picture_file_name"
|
902
|
+
t.string "picture_content_type"
|
903
|
+
t.integer "picture_size"
|
904
|
+
t.datetime "picture_updated_at"
|
905
|
+
t.text "picture_meta"
|
906
|
+
t.string "picture_fingerprint"
|
907
|
+
t.string "picture_id"
|
908
|
+
t.jsonb "image_data"
|
909
|
+
t.index ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type", using: :btree
|
910
|
+
t.index ["picture_id"], name: "index_picture_files_on_picture_id", using: :btree
|
911
|
+
end
|
912
|
+
|
913
|
+
create_table "produce_types", force: :cascade do |t|
|
914
|
+
t.string "name"
|
915
|
+
t.text "display_name"
|
916
|
+
t.text "note"
|
917
|
+
t.integer "position"
|
918
|
+
t.datetime "created_at"
|
919
|
+
t.datetime "updated_at"
|
920
|
+
end
|
921
|
+
|
922
|
+
create_table "produces", force: :cascade do |t|
|
923
|
+
t.integer "agent_id", null: false
|
924
|
+
t.integer "manifestation_id", null: false
|
925
|
+
t.integer "position"
|
926
|
+
t.datetime "created_at"
|
927
|
+
t.datetime "updated_at"
|
928
|
+
t.integer "produce_type_id"
|
929
|
+
t.index ["agent_id"], name: "index_produces_on_agent_id", using: :btree
|
930
|
+
t.index ["manifestation_id"], name: "index_produces_on_manifestation_id", using: :btree
|
931
|
+
end
|
932
|
+
|
933
|
+
create_table "profiles", force: :cascade do |t|
|
934
|
+
t.integer "user_id"
|
935
|
+
t.integer "user_group_id"
|
936
|
+
t.integer "library_id"
|
937
|
+
t.string "locale"
|
938
|
+
t.string "user_number"
|
939
|
+
t.text "full_name"
|
940
|
+
t.text "note"
|
941
|
+
t.text "keyword_list"
|
942
|
+
t.integer "required_role_id"
|
943
|
+
t.datetime "created_at"
|
944
|
+
t.datetime "updated_at"
|
945
|
+
t.string "checkout_icalendar_token"
|
946
|
+
t.boolean "save_checkout_history", default: false, null: false
|
947
|
+
t.datetime "expired_at"
|
948
|
+
t.text "full_name_transcription"
|
949
|
+
t.datetime "date_of_birth"
|
950
|
+
t.index ["checkout_icalendar_token"], name: "index_profiles_on_checkout_icalendar_token", unique: true, using: :btree
|
951
|
+
t.index ["library_id"], name: "index_profiles_on_library_id", using: :btree
|
952
|
+
t.index ["user_group_id"], name: "index_profiles_on_user_group_id", using: :btree
|
953
|
+
t.index ["user_id"], name: "index_profiles_on_user_id", using: :btree
|
954
|
+
t.index ["user_number"], name: "index_profiles_on_user_number", unique: true, using: :btree
|
955
|
+
end
|
956
|
+
|
957
|
+
create_table "realize_types", force: :cascade do |t|
|
958
|
+
t.string "name"
|
959
|
+
t.text "display_name"
|
960
|
+
t.text "note"
|
961
|
+
t.integer "position"
|
962
|
+
t.datetime "created_at"
|
963
|
+
t.datetime "updated_at"
|
964
|
+
end
|
965
|
+
|
966
|
+
create_table "realizes", force: :cascade do |t|
|
967
|
+
t.integer "agent_id", null: false
|
968
|
+
t.integer "expression_id", null: false
|
969
|
+
t.integer "position"
|
970
|
+
t.datetime "created_at"
|
971
|
+
t.datetime "updated_at"
|
972
|
+
t.integer "realize_type_id"
|
973
|
+
t.index ["agent_id"], name: "index_realizes_on_agent_id", using: :btree
|
974
|
+
t.index ["expression_id"], name: "index_realizes_on_expression_id", using: :btree
|
975
|
+
end
|
976
|
+
|
977
|
+
create_table "request_status_types", force: :cascade do |t|
|
978
|
+
t.string "name", null: false
|
979
|
+
t.text "display_name"
|
980
|
+
t.text "note"
|
981
|
+
t.integer "position"
|
982
|
+
t.datetime "created_at"
|
983
|
+
t.datetime "updated_at"
|
984
|
+
end
|
985
|
+
|
986
|
+
create_table "request_types", force: :cascade do |t|
|
987
|
+
t.string "name", null: false
|
988
|
+
t.text "display_name"
|
989
|
+
t.text "note"
|
990
|
+
t.integer "position"
|
991
|
+
t.datetime "created_at"
|
992
|
+
t.datetime "updated_at"
|
993
|
+
end
|
994
|
+
|
995
|
+
create_table "reserve_stat_has_manifestations", force: :cascade do |t|
|
996
|
+
t.integer "manifestation_reserve_stat_id", null: false
|
997
|
+
t.integer "manifestation_id", null: false
|
998
|
+
t.integer "reserves_count"
|
999
|
+
t.datetime "created_at"
|
1000
|
+
t.datetime "updated_at"
|
1001
|
+
t.index ["manifestation_id"], name: "index_reserve_stat_has_manifestations_on_manifestation_id", using: :btree
|
1002
|
+
t.index ["manifestation_reserve_stat_id"], name: "index_reserve_stat_has_manifestations_on_m_reserve_stat_id", using: :btree
|
1003
|
+
end
|
1004
|
+
|
1005
|
+
create_table "reserve_stat_has_users", force: :cascade do |t|
|
1006
|
+
t.integer "user_reserve_stat_id", null: false
|
1007
|
+
t.integer "user_id", null: false
|
1008
|
+
t.integer "reserves_count"
|
1009
|
+
t.datetime "created_at"
|
1010
|
+
t.datetime "updated_at"
|
1011
|
+
t.index ["user_id"], name: "index_reserve_stat_has_users_on_user_id", using: :btree
|
1012
|
+
t.index ["user_reserve_stat_id"], name: "index_reserve_stat_has_users_on_user_reserve_stat_id", using: :btree
|
1013
|
+
end
|
1014
|
+
|
1015
|
+
create_table "reserve_transitions", force: :cascade do |t|
|
1016
|
+
t.string "to_state"
|
1017
|
+
t.text "metadata", default: "{}"
|
1018
|
+
t.integer "sort_key"
|
1019
|
+
t.integer "reserve_id"
|
1020
|
+
t.datetime "created_at"
|
1021
|
+
t.datetime "updated_at"
|
1022
|
+
t.boolean "most_recent"
|
1023
|
+
t.index ["reserve_id"], name: "index_reserve_transitions_on_reserve_id", using: :btree
|
1024
|
+
t.index ["sort_key", "reserve_id"], name: "index_reserve_transitions_on_sort_key_and_reserve_id", unique: true, using: :btree
|
1025
|
+
end
|
1026
|
+
|
1027
|
+
create_table "reserves", force: :cascade do |t|
|
1028
|
+
t.integer "user_id", null: false
|
1029
|
+
t.integer "manifestation_id", null: false
|
1030
|
+
t.integer "item_id"
|
1031
|
+
t.integer "request_status_type_id", null: false
|
1032
|
+
t.datetime "checked_out_at"
|
1033
|
+
t.datetime "created_at"
|
1034
|
+
t.datetime "updated_at"
|
1035
|
+
t.datetime "canceled_at"
|
1036
|
+
t.datetime "expired_at"
|
1037
|
+
t.datetime "deleted_at"
|
1038
|
+
t.boolean "expiration_notice_to_patron", default: false
|
1039
|
+
t.boolean "expiration_notice_to_library", default: false
|
1040
|
+
t.integer "pickup_location_id"
|
1041
|
+
t.datetime "retained_at"
|
1042
|
+
t.datetime "postponed_at"
|
1043
|
+
t.integer "lock_version", default: 0, null: false
|
1044
|
+
t.index ["item_id"], name: "index_reserves_on_item_id", using: :btree
|
1045
|
+
t.index ["manifestation_id"], name: "index_reserves_on_manifestation_id", using: :btree
|
1046
|
+
t.index ["pickup_location_id"], name: "index_reserves_on_pickup_location_id", using: :btree
|
1047
|
+
t.index ["request_status_type_id"], name: "index_reserves_on_request_status_type_id", using: :btree
|
1048
|
+
t.index ["user_id"], name: "index_reserves_on_user_id", using: :btree
|
1049
|
+
end
|
1050
|
+
|
1051
|
+
create_table "resource_export_file_transitions", force: :cascade do |t|
|
1052
|
+
t.string "to_state"
|
1053
|
+
t.jsonb "metadata", default: "{}"
|
1054
|
+
t.integer "sort_key"
|
1055
|
+
t.integer "resource_export_file_id"
|
1056
|
+
t.datetime "created_at"
|
1057
|
+
t.datetime "updated_at"
|
1058
|
+
t.boolean "most_recent"
|
1059
|
+
t.index ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id", using: :btree
|
1060
|
+
t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true, using: :btree
|
1061
|
+
end
|
1062
|
+
|
1063
|
+
create_table "resource_export_files", force: :cascade do |t|
|
1064
|
+
t.integer "user_id"
|
1065
|
+
t.datetime "executed_at"
|
1066
|
+
t.datetime "created_at"
|
1067
|
+
t.datetime "updated_at"
|
1068
|
+
t.string "resource_export_id"
|
1069
|
+
t.integer "resource_export_size"
|
1070
|
+
t.string "resource_export_filename"
|
1071
|
+
t.jsonb "attachment_data"
|
1072
|
+
t.index ["resource_export_id"], name: "index_resource_export_files_on_resource_export_id", using: :btree
|
1073
|
+
end
|
1074
|
+
|
1075
|
+
create_table "resource_import_file_transitions", force: :cascade do |t|
|
1076
|
+
t.string "to_state"
|
1077
|
+
t.jsonb "metadata", default: "{}"
|
1078
|
+
t.integer "sort_key"
|
1079
|
+
t.integer "resource_import_file_id"
|
1080
|
+
t.datetime "created_at"
|
1081
|
+
t.datetime "updated_at"
|
1082
|
+
t.boolean "most_recent"
|
1083
|
+
t.index ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id", using: :btree
|
1084
|
+
t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true, using: :btree
|
1085
|
+
end
|
1086
|
+
|
1087
|
+
create_table "resource_import_files", force: :cascade do |t|
|
1088
|
+
t.integer "parent_id"
|
1089
|
+
t.string "content_type"
|
1090
|
+
t.integer "size"
|
1091
|
+
t.integer "user_id"
|
1092
|
+
t.text "note"
|
1093
|
+
t.datetime "executed_at"
|
1094
|
+
t.string "resource_import_file_name"
|
1095
|
+
t.string "resource_import_content_type"
|
1096
|
+
t.integer "resource_import_size"
|
1097
|
+
t.datetime "resource_import_updated_at"
|
1098
|
+
t.datetime "created_at"
|
1099
|
+
t.datetime "updated_at"
|
1100
|
+
t.string "edit_mode"
|
1101
|
+
t.string "resource_import_fingerprint"
|
1102
|
+
t.text "error_message"
|
1103
|
+
t.string "user_encoding"
|
1104
|
+
t.integer "default_shelf_id"
|
1105
|
+
t.string "resource_import_id"
|
1106
|
+
t.jsonb "attachment_data"
|
1107
|
+
t.index ["parent_id"], name: "index_resource_import_files_on_parent_id", using: :btree
|
1108
|
+
t.index ["resource_import_id"], name: "index_resource_import_files_on_resource_import_id", using: :btree
|
1109
|
+
t.index ["user_id"], name: "index_resource_import_files_on_user_id", using: :btree
|
1110
|
+
end
|
1111
|
+
|
1112
|
+
create_table "resource_import_results", force: :cascade do |t|
|
1113
|
+
t.integer "resource_import_file_id"
|
1114
|
+
t.integer "manifestation_id"
|
1115
|
+
t.integer "item_id"
|
1116
|
+
t.text "body"
|
1117
|
+
t.datetime "created_at"
|
1118
|
+
t.datetime "updated_at"
|
1119
|
+
t.text "error_message"
|
1120
|
+
t.index ["item_id"], name: "index_resource_import_results_on_item_id", using: :btree
|
1121
|
+
t.index ["manifestation_id"], name: "index_resource_import_results_on_manifestation_id", using: :btree
|
1122
|
+
t.index ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id", using: :btree
|
1123
|
+
end
|
1124
|
+
|
1125
|
+
create_table "roles", force: :cascade do |t|
|
1126
|
+
t.string "name", null: false
|
1127
|
+
t.string "display_name"
|
1128
|
+
t.text "note"
|
1129
|
+
t.datetime "created_at"
|
1130
|
+
t.datetime "updated_at"
|
1131
|
+
t.integer "score", default: 0, null: false
|
1132
|
+
t.integer "position"
|
1133
|
+
end
|
1134
|
+
|
1135
|
+
create_table "search_engines", force: :cascade do |t|
|
1136
|
+
t.string "name", null: false
|
1137
|
+
t.text "display_name"
|
1138
|
+
t.string "url", null: false
|
1139
|
+
t.text "base_url", null: false
|
1140
|
+
t.text "http_method", null: false
|
1141
|
+
t.text "query_param", null: false
|
1142
|
+
t.text "additional_param"
|
1143
|
+
t.text "note"
|
1144
|
+
t.integer "position"
|
1145
|
+
t.datetime "created_at"
|
1146
|
+
t.datetime "updated_at"
|
1147
|
+
end
|
1148
|
+
|
1149
|
+
create_table "series_statement_merge_lists", force: :cascade do |t|
|
1150
|
+
t.string "title"
|
1151
|
+
t.datetime "created_at"
|
1152
|
+
t.datetime "updated_at"
|
1153
|
+
end
|
1154
|
+
|
1155
|
+
create_table "series_statement_merges", force: :cascade do |t|
|
1156
|
+
t.integer "series_statement_id", null: false
|
1157
|
+
t.integer "series_statement_merge_list_id", null: false
|
1158
|
+
t.datetime "created_at"
|
1159
|
+
t.datetime "updated_at"
|
1160
|
+
t.index ["series_statement_id"], name: "index_series_statement_merges_on_series_statement_id", using: :btree
|
1161
|
+
t.index ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id", using: :btree
|
1162
|
+
end
|
1163
|
+
|
1164
|
+
create_table "series_statements", force: :cascade do |t|
|
1165
|
+
t.text "original_title"
|
1166
|
+
t.text "numbering"
|
1167
|
+
t.text "title_subseries"
|
1168
|
+
t.text "numbering_subseries"
|
1169
|
+
t.integer "position"
|
1170
|
+
t.datetime "created_at"
|
1171
|
+
t.datetime "updated_at"
|
1172
|
+
t.text "title_transcription"
|
1173
|
+
t.text "title_alternative"
|
1174
|
+
t.string "series_statement_identifier"
|
1175
|
+
t.integer "manifestation_id"
|
1176
|
+
t.text "note"
|
1177
|
+
t.text "title_subseries_transcription"
|
1178
|
+
t.text "creator_string"
|
1179
|
+
t.text "volume_number_string"
|
1180
|
+
t.text "volume_number_transcription_string"
|
1181
|
+
t.boolean "series_master"
|
1182
|
+
t.integer "root_manifestation_id"
|
1183
|
+
t.index ["manifestation_id"], name: "index_series_statements_on_manifestation_id", using: :btree
|
1184
|
+
t.index ["root_manifestation_id"], name: "index_series_statements_on_root_manifestation_id", using: :btree
|
1185
|
+
t.index ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier", using: :btree
|
1186
|
+
end
|
1187
|
+
|
1188
|
+
create_table "shelves", force: :cascade do |t|
|
1189
|
+
t.string "name", null: false
|
1190
|
+
t.text "display_name"
|
1191
|
+
t.text "note"
|
1192
|
+
t.integer "library_id", default: 1, null: false
|
1193
|
+
t.integer "items_count", default: 0, null: false
|
1194
|
+
t.integer "position"
|
1195
|
+
t.datetime "created_at"
|
1196
|
+
t.datetime "updated_at"
|
1197
|
+
t.datetime "deleted_at"
|
1198
|
+
t.boolean "closed", default: false, null: false
|
1199
|
+
t.index ["library_id"], name: "index_shelves_on_library_id", using: :btree
|
1200
|
+
end
|
1201
|
+
|
1202
|
+
create_table "subscribes", force: :cascade do |t|
|
1203
|
+
t.integer "subscription_id", null: false
|
1204
|
+
t.integer "work_id", null: false
|
1205
|
+
t.datetime "start_at", null: false
|
1206
|
+
t.datetime "end_at", null: false
|
1207
|
+
t.datetime "created_at"
|
1208
|
+
t.datetime "updated_at"
|
1209
|
+
t.index ["subscription_id"], name: "index_subscribes_on_subscription_id", using: :btree
|
1210
|
+
t.index ["work_id"], name: "index_subscribes_on_work_id", using: :btree
|
1211
|
+
end
|
1212
|
+
|
1213
|
+
create_table "subscriptions", force: :cascade do |t|
|
1214
|
+
t.text "title", null: false
|
1215
|
+
t.text "note"
|
1216
|
+
t.integer "user_id"
|
1217
|
+
t.integer "order_list_id"
|
1218
|
+
t.datetime "deleted_at"
|
1219
|
+
t.integer "subscribes_count", default: 0, null: false
|
1220
|
+
t.datetime "created_at"
|
1221
|
+
t.datetime "updated_at"
|
1222
|
+
t.index ["order_list_id"], name: "index_subscriptions_on_order_list_id", using: :btree
|
1223
|
+
t.index ["user_id"], name: "index_subscriptions_on_user_id", using: :btree
|
1224
|
+
end
|
1225
|
+
|
1226
|
+
create_table "use_restrictions", force: :cascade do |t|
|
1227
|
+
t.string "name", null: false
|
1228
|
+
t.text "display_name"
|
1229
|
+
t.text "note"
|
1230
|
+
t.integer "position"
|
1231
|
+
t.datetime "created_at"
|
1232
|
+
t.datetime "updated_at"
|
1233
|
+
end
|
1234
|
+
|
1235
|
+
create_table "user_checkout_stat_transitions", force: :cascade do |t|
|
1236
|
+
t.string "to_state"
|
1237
|
+
t.text "metadata", default: "{}"
|
1238
|
+
t.integer "sort_key"
|
1239
|
+
t.integer "user_checkout_stat_id"
|
1240
|
+
t.datetime "created_at"
|
1241
|
+
t.datetime "updated_at"
|
1242
|
+
t.boolean "most_recent"
|
1243
|
+
t.index ["sort_key", "user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_sort_key_and_stat_id", unique: true, using: :btree
|
1244
|
+
t.index ["user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_user_checkout_stat_id", using: :btree
|
1245
|
+
end
|
1246
|
+
|
1247
|
+
create_table "user_checkout_stats", force: :cascade do |t|
|
1248
|
+
t.datetime "start_date"
|
1249
|
+
t.datetime "end_date"
|
1250
|
+
t.text "note"
|
1251
|
+
t.datetime "created_at"
|
1252
|
+
t.datetime "updated_at"
|
1253
|
+
t.datetime "started_at"
|
1254
|
+
t.datetime "completed_at"
|
1255
|
+
t.integer "user_id"
|
1256
|
+
t.index ["user_id"], name: "index_user_checkout_stats_on_user_id", using: :btree
|
1257
|
+
end
|
1258
|
+
|
1259
|
+
create_table "user_export_file_transitions", force: :cascade do |t|
|
1260
|
+
t.string "to_state"
|
1261
|
+
t.text "metadata", default: "{}"
|
1262
|
+
t.integer "sort_key"
|
1263
|
+
t.integer "user_export_file_id"
|
1264
|
+
t.datetime "created_at"
|
1265
|
+
t.datetime "updated_at"
|
1266
|
+
t.boolean "most_recent"
|
1267
|
+
t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true, using: :btree
|
1268
|
+
t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id", using: :btree
|
1269
|
+
t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id", using: :btree
|
1270
|
+
end
|
1271
|
+
|
1272
|
+
create_table "user_export_files", force: :cascade do |t|
|
1273
|
+
t.integer "user_id"
|
1274
|
+
t.datetime "executed_at"
|
1275
|
+
t.datetime "created_at"
|
1276
|
+
t.datetime "updated_at"
|
1277
|
+
t.jsonb "attachment_data"
|
1278
|
+
t.index ["user_id"], name: "index_user_export_files_on_user_id", using: :btree
|
1279
|
+
end
|
1280
|
+
|
1281
|
+
create_table "user_group_has_checkout_types", force: :cascade do |t|
|
1282
|
+
t.integer "user_group_id", null: false
|
1283
|
+
t.integer "checkout_type_id", null: false
|
1284
|
+
t.integer "checkout_limit", default: 0, null: false
|
1285
|
+
t.integer "checkout_period", default: 0, null: false
|
1286
|
+
t.integer "checkout_renewal_limit", default: 0, null: false
|
1287
|
+
t.integer "reservation_limit", default: 0, null: false
|
1288
|
+
t.integer "reservation_expired_period", default: 7, null: false
|
1289
|
+
t.boolean "set_due_date_before_closing_day", default: false, null: false
|
1290
|
+
t.datetime "fixed_due_date"
|
1291
|
+
t.text "note"
|
1292
|
+
t.integer "position"
|
1293
|
+
t.datetime "created_at"
|
1294
|
+
t.datetime "updated_at"
|
1295
|
+
t.integer "current_checkout_count"
|
1296
|
+
t.index ["checkout_type_id"], name: "index_user_group_has_checkout_types_on_checkout_type_id", using: :btree
|
1297
|
+
t.index ["user_group_id"], name: "index_user_group_has_checkout_types_on_user_group_id", using: :btree
|
1298
|
+
end
|
1299
|
+
|
1300
|
+
create_table "user_groups", force: :cascade do |t|
|
1301
|
+
t.string "name"
|
1302
|
+
t.text "display_name"
|
1303
|
+
t.text "note"
|
1304
|
+
t.integer "position"
|
1305
|
+
t.datetime "created_at"
|
1306
|
+
t.datetime "updated_at"
|
1307
|
+
t.datetime "deleted_at"
|
1308
|
+
t.integer "valid_period_for_new_user", default: 0, null: false
|
1309
|
+
t.datetime "expired_at"
|
1310
|
+
t.integer "number_of_day_to_notify_overdue", default: 1, null: false
|
1311
|
+
t.integer "number_of_day_to_notify_due_date", default: 7, null: false
|
1312
|
+
t.integer "number_of_time_to_notify_overdue", default: 3, null: false
|
1313
|
+
end
|
1314
|
+
|
1315
|
+
create_table "user_has_roles", force: :cascade do |t|
|
1316
|
+
t.integer "user_id", null: false
|
1317
|
+
t.integer "role_id", null: false
|
1318
|
+
t.datetime "created_at"
|
1319
|
+
t.datetime "updated_at"
|
1320
|
+
t.index ["role_id"], name: "index_user_has_roles_on_role_id", using: :btree
|
1321
|
+
t.index ["user_id"], name: "index_user_has_roles_on_user_id", using: :btree
|
1322
|
+
end
|
1323
|
+
|
1324
|
+
create_table "user_import_file_transitions", force: :cascade do |t|
|
1325
|
+
t.string "to_state"
|
1326
|
+
t.text "metadata", default: "{}"
|
1327
|
+
t.integer "sort_key"
|
1328
|
+
t.integer "user_import_file_id"
|
1329
|
+
t.datetime "created_at"
|
1330
|
+
t.datetime "updated_at"
|
1331
|
+
t.boolean "most_recent"
|
1332
|
+
t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true, using: :btree
|
1333
|
+
t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id", using: :btree
|
1334
|
+
end
|
1335
|
+
|
1336
|
+
create_table "user_import_files", force: :cascade do |t|
|
1337
|
+
t.integer "user_id"
|
1338
|
+
t.text "note"
|
1339
|
+
t.datetime "executed_at"
|
1340
|
+
t.string "user_import_file_name"
|
1341
|
+
t.string "user_import_content_type"
|
1342
|
+
t.integer "user_import_file_size"
|
1343
|
+
t.datetime "user_import_updated_at"
|
1344
|
+
t.string "user_import_fingerprint"
|
1345
|
+
t.string "edit_mode"
|
1346
|
+
t.text "error_message"
|
1347
|
+
t.datetime "created_at"
|
1348
|
+
t.datetime "updated_at"
|
1349
|
+
t.string "user_encoding"
|
1350
|
+
t.integer "default_library_id"
|
1351
|
+
t.integer "default_user_group_id"
|
1352
|
+
t.jsonb "attachment_data"
|
1353
|
+
t.index ["user_id"], name: "index_user_import_files_on_user_id", using: :btree
|
1354
|
+
end
|
1355
|
+
|
1356
|
+
create_table "user_import_results", force: :cascade do |t|
|
1357
|
+
t.integer "user_import_file_id"
|
1358
|
+
t.integer "user_id"
|
1359
|
+
t.text "body"
|
1360
|
+
t.datetime "created_at"
|
1361
|
+
t.datetime "updated_at"
|
1362
|
+
t.text "error_message"
|
1363
|
+
t.index ["user_id"], name: "index_user_import_results_on_user_id", using: :btree
|
1364
|
+
t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id", using: :btree
|
1365
|
+
end
|
1366
|
+
|
1367
|
+
create_table "user_reserve_stat_transitions", force: :cascade do |t|
|
1368
|
+
t.string "to_state"
|
1369
|
+
t.text "metadata", default: "{}"
|
1370
|
+
t.integer "sort_key"
|
1371
|
+
t.integer "user_reserve_stat_id"
|
1372
|
+
t.datetime "created_at"
|
1373
|
+
t.datetime "updated_at"
|
1374
|
+
t.boolean "most_recent"
|
1375
|
+
t.index ["sort_key", "user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_sort_key_and_stat_id", unique: true, using: :btree
|
1376
|
+
t.index ["user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_user_reserve_stat_id", using: :btree
|
1377
|
+
end
|
1378
|
+
|
1379
|
+
create_table "user_reserve_stats", force: :cascade do |t|
|
1380
|
+
t.datetime "start_date"
|
1381
|
+
t.datetime "end_date"
|
1382
|
+
t.text "note"
|
1383
|
+
t.datetime "created_at"
|
1384
|
+
t.datetime "updated_at"
|
1385
|
+
t.datetime "started_at"
|
1386
|
+
t.datetime "completed_at"
|
1387
|
+
t.integer "user_id"
|
1388
|
+
t.index ["user_id"], name: "index_user_reserve_stats_on_user_id", using: :btree
|
1389
|
+
end
|
1390
|
+
|
1391
|
+
create_table "users", force: :cascade do |t|
|
1392
|
+
t.string "email", default: "", null: false
|
1393
|
+
t.string "encrypted_password", default: "", null: false
|
1394
|
+
t.string "reset_password_token"
|
1395
|
+
t.datetime "reset_password_sent_at"
|
1396
|
+
t.datetime "remember_created_at"
|
1397
|
+
t.integer "sign_in_count", default: 0
|
1398
|
+
t.datetime "current_sign_in_at"
|
1399
|
+
t.datetime "last_sign_in_at"
|
1400
|
+
t.string "current_sign_in_ip"
|
1401
|
+
t.string "last_sign_in_ip"
|
1402
|
+
t.datetime "created_at"
|
1403
|
+
t.datetime "updated_at"
|
1404
|
+
t.string "username"
|
1405
|
+
t.datetime "deleted_at"
|
1406
|
+
t.datetime "expired_at"
|
1407
|
+
t.integer "failed_attempts", default: 0
|
1408
|
+
t.string "unlock_token"
|
1409
|
+
t.datetime "locked_at"
|
1410
|
+
t.datetime "confirmed_at"
|
1411
|
+
t.index ["email"], name: "index_users_on_email", using: :btree
|
1412
|
+
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
|
1413
|
+
t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true, using: :btree
|
1414
|
+
t.index ["username"], name: "index_users_on_username", unique: true, using: :btree
|
1415
|
+
end
|
1416
|
+
|
1417
|
+
create_table "withdraws", force: :cascade do |t|
|
1418
|
+
t.integer "basket_id"
|
1419
|
+
t.integer "item_id"
|
1420
|
+
t.integer "librarian_id"
|
1421
|
+
t.datetime "created_at", null: false
|
1422
|
+
t.datetime "updated_at", null: false
|
1423
|
+
t.index ["basket_id"], name: "index_withdraws_on_basket_id", using: :btree
|
1424
|
+
t.index ["item_id"], name: "index_withdraws_on_item_id", using: :btree
|
1425
|
+
end
|
1426
|
+
|
1427
|
+
add_foreign_key "isbn_records", "manifestations"
|
1428
|
+
add_foreign_key "items", "manifestations"
|
1429
|
+
add_foreign_key "items", "shelves"
|
1430
|
+
add_foreign_key "library_groups", "users"
|
1431
|
+
add_foreign_key "periodicals", "manifestations"
|
1432
|
+
add_foreign_key "profiles", "users"
|
1433
|
+
add_foreign_key "reserves", "manifestations"
|
1434
|
+
add_foreign_key "shelves", "libraries"
|
1435
|
+
add_foreign_key "user_has_roles", "roles"
|
1436
|
+
add_foreign_key "user_has_roles", "users"
|
1431
1437
|
end
|