enju_message 0.1.14.pre19 → 0.1.14.pre20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +8 -1
- data/app/models/message_state_machine.rb +0 -2
- data/app/views/messages/index.html.erb +2 -2
- data/db/migrate/20140518111006_create_message_transitions.rb +5 -1
- data/db/migrate/20140518135713_create_message_request_transitions.rb +5 -1
- data/lib/enju_message/version.rb +1 -1
- data/spec/dummy/config/database.yml +23 -18
- data/spec/dummy/db/migrate/005_create_manifestations.rb +0 -1
- data/spec/dummy/db/migrate/133_create_agent_merges.rb +15 -0
- data/spec/dummy/db/migrate/134_create_agent_merge_lists.rb +13 -0
- data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb +5 -0
- data/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb +9 -0
- data/spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +5 -0
- data/spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +5 -0
- data/spec/dummy/db/schema.rb +424 -404
- data/spec/fixtures/users.yml +1 -1
- data/spec/spec_helper.rb +2 -0
- metadata +46 -2
data/spec/dummy/db/schema.rb
CHANGED
@@ -9,34 +9,34 @@
|
|
9
9
|
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
10
|
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
11
|
#
|
12
|
-
# It's strongly recommended
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:
|
14
|
+
ActiveRecord::Schema.define(version: 20141003182825) do
|
15
15
|
|
16
|
-
create_table "accepts", :
|
16
|
+
create_table "accepts", force: true do |t|
|
17
17
|
t.integer "basket_id"
|
18
18
|
t.integer "item_id"
|
19
19
|
t.integer "librarian_id"
|
20
|
-
t.datetime "created_at"
|
21
|
-
t.datetime "updated_at"
|
20
|
+
t.datetime "created_at"
|
21
|
+
t.datetime "updated_at"
|
22
22
|
end
|
23
23
|
|
24
|
-
add_index "accepts", ["basket_id"], :
|
25
|
-
add_index "accepts", ["item_id"], :
|
24
|
+
add_index "accepts", ["basket_id"], name: "index_accepts_on_basket_id"
|
25
|
+
add_index "accepts", ["item_id"], name: "index_accepts_on_item_id"
|
26
26
|
|
27
|
-
create_table "agent_import_file_transitions", :
|
27
|
+
create_table "agent_import_file_transitions", force: true do |t|
|
28
28
|
t.string "to_state"
|
29
|
-
t.text "metadata", :
|
29
|
+
t.text "metadata", default: "{}"
|
30
30
|
t.integer "sort_key"
|
31
31
|
t.integer "agent_import_file_id"
|
32
|
-
t.datetime "created_at"
|
33
|
-
t.datetime "updated_at"
|
32
|
+
t.datetime "created_at"
|
33
|
+
t.datetime "updated_at"
|
34
34
|
end
|
35
35
|
|
36
|
-
add_index "agent_import_file_transitions", ["agent_import_file_id"], :
|
37
|
-
add_index "agent_import_file_transitions", ["sort_key", "agent_import_file_id"], :
|
36
|
+
add_index "agent_import_file_transitions", ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
|
37
|
+
add_index "agent_import_file_transitions", ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
|
38
38
|
|
39
|
-
create_table "agent_import_files", :
|
39
|
+
create_table "agent_import_files", force: true do |t|
|
40
40
|
t.integer "parent_id"
|
41
41
|
t.string "content_type"
|
42
42
|
t.integer "size"
|
@@ -47,56 +47,72 @@ ActiveRecord::Schema.define(:version => 20140817155043) do
|
|
47
47
|
t.string "agent_import_content_type"
|
48
48
|
t.integer "agent_import_file_size"
|
49
49
|
t.datetime "agent_import_updated_at"
|
50
|
-
t.datetime "created_at"
|
51
|
-
t.datetime "updated_at"
|
50
|
+
t.datetime "created_at"
|
51
|
+
t.datetime "updated_at"
|
52
52
|
t.string "agent_import_fingerprint"
|
53
53
|
t.text "error_message"
|
54
54
|
t.string "edit_mode"
|
55
55
|
t.string "user_encoding"
|
56
56
|
end
|
57
57
|
|
58
|
-
add_index "agent_import_files", ["parent_id"], :
|
59
|
-
add_index "agent_import_files", ["user_id"], :
|
58
|
+
add_index "agent_import_files", ["parent_id"], name: "index_agent_import_files_on_parent_id"
|
59
|
+
add_index "agent_import_files", ["user_id"], name: "index_agent_import_files_on_user_id"
|
60
60
|
|
61
|
-
create_table "agent_import_results", :
|
61
|
+
create_table "agent_import_results", force: true do |t|
|
62
62
|
t.integer "agent_import_file_id"
|
63
63
|
t.integer "agent_id"
|
64
64
|
t.text "body"
|
65
|
-
t.datetime "created_at"
|
66
|
-
t.datetime "updated_at"
|
65
|
+
t.datetime "created_at"
|
66
|
+
t.datetime "updated_at"
|
67
67
|
end
|
68
68
|
|
69
|
-
create_table "
|
70
|
-
t.string "
|
69
|
+
create_table "agent_merge_lists", force: true do |t|
|
70
|
+
t.string "title"
|
71
|
+
t.datetime "created_at"
|
72
|
+
t.datetime "updated_at"
|
73
|
+
end
|
74
|
+
|
75
|
+
create_table "agent_merges", force: true do |t|
|
76
|
+
t.integer "agent_id", null: false
|
77
|
+
t.integer "agent_merge_list_id", null: false
|
78
|
+
t.datetime "created_at"
|
79
|
+
t.datetime "updated_at"
|
80
|
+
end
|
81
|
+
|
82
|
+
add_index "agent_merges", ["agent_id"], name: "index_agent_merges_on_agent_id"
|
83
|
+
add_index "agent_merges", ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id"
|
84
|
+
|
85
|
+
create_table "agent_relationship_types", force: true do |t|
|
86
|
+
t.string "name", null: false
|
71
87
|
t.text "display_name"
|
72
88
|
t.text "note"
|
73
89
|
t.integer "position"
|
74
|
-
t.datetime "created_at"
|
75
|
-
t.datetime "updated_at"
|
90
|
+
t.datetime "created_at"
|
91
|
+
t.datetime "updated_at"
|
76
92
|
end
|
77
93
|
|
78
|
-
create_table "agent_relationships", :
|
94
|
+
create_table "agent_relationships", force: true do |t|
|
79
95
|
t.integer "parent_id"
|
80
96
|
t.integer "child_id"
|
81
97
|
t.integer "agent_relationship_type_id"
|
82
|
-
t.datetime "created_at"
|
83
|
-
t.datetime "updated_at"
|
98
|
+
t.datetime "created_at"
|
99
|
+
t.datetime "updated_at"
|
84
100
|
t.integer "position"
|
85
101
|
end
|
86
102
|
|
87
|
-
add_index "agent_relationships", ["child_id"], :
|
88
|
-
add_index "agent_relationships", ["parent_id"], :
|
103
|
+
add_index "agent_relationships", ["child_id"], name: "index_agent_relationships_on_child_id"
|
104
|
+
add_index "agent_relationships", ["parent_id"], name: "index_agent_relationships_on_parent_id"
|
89
105
|
|
90
|
-
create_table "agent_types", :
|
91
|
-
t.string "name", :
|
106
|
+
create_table "agent_types", force: true do |t|
|
107
|
+
t.string "name", null: false
|
92
108
|
t.text "display_name"
|
93
109
|
t.text "note"
|
94
110
|
t.integer "position"
|
95
|
-
t.datetime "created_at"
|
96
|
-
t.datetime "updated_at"
|
111
|
+
t.datetime "created_at"
|
112
|
+
t.datetime "updated_at"
|
97
113
|
end
|
98
114
|
|
99
|
-
create_table "agents", :
|
115
|
+
create_table "agents", force: true do |t|
|
100
116
|
t.string "last_name"
|
101
117
|
t.string "middle_name"
|
102
118
|
t.string "first_name"
|
@@ -108,8 +124,8 @@ ActiveRecord::Schema.define(:version => 20140817155043) do
|
|
108
124
|
t.string "full_name"
|
109
125
|
t.text "full_name_transcription"
|
110
126
|
t.text "full_name_alternative"
|
111
|
-
t.datetime "created_at"
|
112
|
-
t.datetime "updated_at"
|
127
|
+
t.datetime "created_at"
|
128
|
+
t.datetime "updated_at"
|
113
129
|
t.datetime "deleted_at"
|
114
130
|
t.string "zip_code_1"
|
115
131
|
t.string "zip_code_2"
|
@@ -129,13 +145,13 @@ ActiveRecord::Schema.define(:version => 20140817155043) do
|
|
129
145
|
t.text "region"
|
130
146
|
t.datetime "date_of_birth"
|
131
147
|
t.datetime "date_of_death"
|
132
|
-
t.integer "language_id", :
|
133
|
-
t.integer "country_id", :
|
134
|
-
t.integer "agent_type_id", :
|
135
|
-
t.integer "lock_version", :
|
148
|
+
t.integer "language_id", default: 1, null: false
|
149
|
+
t.integer "country_id", default: 1, null: false
|
150
|
+
t.integer "agent_type_id", default: 1, null: false
|
151
|
+
t.integer "lock_version", default: 0, null: false
|
136
152
|
t.text "note"
|
137
|
-
t.integer "required_role_id", :
|
138
|
-
t.integer "required_score", :
|
153
|
+
t.integer "required_role_id", default: 1, null: false
|
154
|
+
t.integer "required_score", default: 0, null: false
|
139
155
|
t.text "email"
|
140
156
|
t.text "url"
|
141
157
|
t.text "full_name_alternative_transcription"
|
@@ -144,24 +160,24 @@ ActiveRecord::Schema.define(:version => 20140817155043) do
|
|
144
160
|
t.string "agent_identifier"
|
145
161
|
end
|
146
162
|
|
147
|
-
add_index "agents", ["agent_identifier"], :
|
148
|
-
add_index "agents", ["country_id"], :
|
149
|
-
add_index "agents", ["full_name"], :
|
150
|
-
add_index "agents", ["language_id"], :
|
151
|
-
add_index "agents", ["required_role_id"], :
|
163
|
+
add_index "agents", ["agent_identifier"], name: "index_agents_on_agent_identifier"
|
164
|
+
add_index "agents", ["country_id"], name: "index_agents_on_country_id"
|
165
|
+
add_index "agents", ["full_name"], name: "index_agents_on_full_name"
|
166
|
+
add_index "agents", ["language_id"], name: "index_agents_on_language_id"
|
167
|
+
add_index "agents", ["required_role_id"], name: "index_agents_on_required_role_id"
|
152
168
|
|
153
|
-
create_table "baskets", :
|
169
|
+
create_table "baskets", force: true do |t|
|
154
170
|
t.integer "user_id"
|
155
171
|
t.text "note"
|
156
|
-
t.integer "lock_version", :
|
157
|
-
t.datetime "created_at"
|
158
|
-
t.datetime "updated_at"
|
172
|
+
t.integer "lock_version", default: 0, null: false
|
173
|
+
t.datetime "created_at"
|
174
|
+
t.datetime "updated_at"
|
159
175
|
end
|
160
176
|
|
161
|
-
add_index "baskets", ["user_id"], :
|
177
|
+
add_index "baskets", ["user_id"], name: "index_baskets_on_user_id"
|
162
178
|
|
163
|
-
create_table "bookstores", :
|
164
|
-
t.text "name", :
|
179
|
+
create_table "bookstores", force: true do |t|
|
180
|
+
t.text "name", null: false
|
165
181
|
t.string "zip_code"
|
166
182
|
t.text "address"
|
167
183
|
t.text "note"
|
@@ -170,39 +186,39 @@ ActiveRecord::Schema.define(:version => 20140817155043) do
|
|
170
186
|
t.string "url"
|
171
187
|
t.integer "position"
|
172
188
|
t.datetime "deleted_at"
|
173
|
-
t.datetime "created_at"
|
174
|
-
t.datetime "updated_at"
|
189
|
+
t.datetime "created_at"
|
190
|
+
t.datetime "updated_at"
|
175
191
|
end
|
176
192
|
|
177
|
-
create_table "budget_types", :
|
193
|
+
create_table "budget_types", force: true do |t|
|
178
194
|
t.string "name"
|
179
195
|
t.text "display_name"
|
180
196
|
t.text "note"
|
181
197
|
t.integer "position"
|
182
|
-
t.datetime "created_at"
|
183
|
-
t.datetime "updated_at"
|
198
|
+
t.datetime "created_at"
|
199
|
+
t.datetime "updated_at"
|
184
200
|
end
|
185
201
|
|
186
|
-
create_table "carrier_types", :
|
187
|
-
t.string "name", :
|
202
|
+
create_table "carrier_types", force: true do |t|
|
203
|
+
t.string "name", null: false
|
188
204
|
t.text "display_name"
|
189
205
|
t.text "note"
|
190
206
|
t.integer "position"
|
191
|
-
t.datetime "created_at"
|
192
|
-
t.datetime "updated_at"
|
207
|
+
t.datetime "created_at"
|
208
|
+
t.datetime "updated_at"
|
193
209
|
end
|
194
210
|
|
195
|
-
create_table "content_types", :
|
196
|
-
t.string "name", :
|
211
|
+
create_table "content_types", force: true do |t|
|
212
|
+
t.string "name", null: false
|
197
213
|
t.text "display_name"
|
198
214
|
t.text "note"
|
199
215
|
t.integer "position"
|
200
|
-
t.datetime "created_at"
|
201
|
-
t.datetime "updated_at"
|
216
|
+
t.datetime "created_at"
|
217
|
+
t.datetime "updated_at"
|
202
218
|
end
|
203
219
|
|
204
|
-
create_table "countries", :
|
205
|
-
t.string "name", :
|
220
|
+
create_table "countries", force: true do |t|
|
221
|
+
t.string "name", null: false
|
206
222
|
t.text "display_name"
|
207
223
|
t.string "alpha_2"
|
208
224
|
t.string "alpha_3"
|
@@ -211,140 +227,140 @@ ActiveRecord::Schema.define(:version => 20140817155043) do
|
|
211
227
|
t.integer "position"
|
212
228
|
end
|
213
229
|
|
214
|
-
add_index "countries", ["alpha_2"], :
|
215
|
-
add_index "countries", ["alpha_3"], :
|
216
|
-
add_index "countries", ["name"], :
|
217
|
-
add_index "countries", ["numeric_3"], :
|
230
|
+
add_index "countries", ["alpha_2"], name: "index_countries_on_alpha_2"
|
231
|
+
add_index "countries", ["alpha_3"], name: "index_countries_on_alpha_3"
|
232
|
+
add_index "countries", ["name"], name: "index_countries_on_name"
|
233
|
+
add_index "countries", ["numeric_3"], name: "index_countries_on_numeric_3"
|
218
234
|
|
219
|
-
create_table "create_types", :
|
235
|
+
create_table "create_types", force: true do |t|
|
220
236
|
t.string "name"
|
221
237
|
t.text "display_name"
|
222
238
|
t.text "note"
|
223
239
|
t.integer "position"
|
224
|
-
t.datetime "created_at"
|
225
|
-
t.datetime "updated_at"
|
240
|
+
t.datetime "created_at"
|
241
|
+
t.datetime "updated_at"
|
226
242
|
end
|
227
243
|
|
228
|
-
create_table "creates", :
|
229
|
-
t.integer "agent_id", :
|
230
|
-
t.integer "work_id", :
|
244
|
+
create_table "creates", force: true do |t|
|
245
|
+
t.integer "agent_id", null: false
|
246
|
+
t.integer "work_id", null: false
|
231
247
|
t.integer "position"
|
232
|
-
t.datetime "created_at"
|
233
|
-
t.datetime "updated_at"
|
248
|
+
t.datetime "created_at"
|
249
|
+
t.datetime "updated_at"
|
234
250
|
t.integer "create_type_id"
|
235
251
|
end
|
236
252
|
|
237
|
-
add_index "creates", ["agent_id"], :
|
238
|
-
add_index "creates", ["work_id"], :
|
253
|
+
add_index "creates", ["agent_id"], name: "index_creates_on_agent_id"
|
254
|
+
add_index "creates", ["work_id"], name: "index_creates_on_work_id"
|
239
255
|
|
240
|
-
create_table "donates", :
|
241
|
-
t.integer "agent_id", :
|
242
|
-
t.integer "item_id", :
|
243
|
-
t.datetime "created_at"
|
244
|
-
t.datetime "updated_at"
|
256
|
+
create_table "donates", force: true do |t|
|
257
|
+
t.integer "agent_id", null: false
|
258
|
+
t.integer "item_id", null: false
|
259
|
+
t.datetime "created_at"
|
260
|
+
t.datetime "updated_at"
|
245
261
|
end
|
246
262
|
|
247
|
-
add_index "donates", ["agent_id"], :
|
248
|
-
add_index "donates", ["item_id"], :
|
263
|
+
add_index "donates", ["agent_id"], name: "index_donates_on_agent_id"
|
264
|
+
add_index "donates", ["item_id"], name: "index_donates_on_item_id"
|
249
265
|
|
250
|
-
create_table "exemplifies", :
|
251
|
-
t.integer "manifestation_id", :
|
252
|
-
t.integer "item_id", :
|
266
|
+
create_table "exemplifies", force: true do |t|
|
267
|
+
t.integer "manifestation_id", null: false
|
268
|
+
t.integer "item_id", null: false
|
253
269
|
t.integer "position"
|
254
|
-
t.datetime "created_at"
|
255
|
-
t.datetime "updated_at"
|
270
|
+
t.datetime "created_at"
|
271
|
+
t.datetime "updated_at"
|
256
272
|
end
|
257
273
|
|
258
|
-
add_index "exemplifies", ["item_id"], :
|
259
|
-
add_index "exemplifies", ["manifestation_id"], :
|
274
|
+
add_index "exemplifies", ["item_id"], name: "index_exemplifies_on_item_id", unique: true
|
275
|
+
add_index "exemplifies", ["manifestation_id"], name: "index_exemplifies_on_manifestation_id"
|
260
276
|
|
261
|
-
create_table "extents", :
|
262
|
-
t.string "name", :
|
277
|
+
create_table "extents", force: true do |t|
|
278
|
+
t.string "name", null: false
|
263
279
|
t.text "display_name"
|
264
280
|
t.text "note"
|
265
281
|
t.integer "position"
|
266
|
-
t.datetime "created_at"
|
267
|
-
t.datetime "updated_at"
|
282
|
+
t.datetime "created_at"
|
283
|
+
t.datetime "updated_at"
|
268
284
|
end
|
269
285
|
|
270
|
-
create_table "form_of_works", :
|
271
|
-
t.string "name", :
|
286
|
+
create_table "form_of_works", force: true do |t|
|
287
|
+
t.string "name", null: false
|
272
288
|
t.text "display_name"
|
273
289
|
t.text "note"
|
274
290
|
t.integer "position"
|
275
|
-
t.datetime "created_at"
|
276
|
-
t.datetime "updated_at"
|
291
|
+
t.datetime "created_at"
|
292
|
+
t.datetime "updated_at"
|
277
293
|
end
|
278
294
|
|
279
|
-
create_table "frequencies", :
|
280
|
-
t.string "name", :
|
295
|
+
create_table "frequencies", force: true do |t|
|
296
|
+
t.string "name", null: false
|
281
297
|
t.text "display_name"
|
282
298
|
t.text "note"
|
283
299
|
t.integer "position"
|
284
|
-
t.datetime "created_at"
|
285
|
-
t.datetime "updated_at"
|
300
|
+
t.datetime "created_at"
|
301
|
+
t.datetime "updated_at"
|
286
302
|
end
|
287
303
|
|
288
|
-
create_table "identifier_types", :
|
304
|
+
create_table "identifier_types", force: true do |t|
|
289
305
|
t.string "name"
|
290
306
|
t.text "display_name"
|
291
307
|
t.text "note"
|
292
308
|
t.integer "position"
|
293
|
-
t.datetime "created_at"
|
294
|
-
t.datetime "updated_at"
|
309
|
+
t.datetime "created_at"
|
310
|
+
t.datetime "updated_at"
|
295
311
|
end
|
296
312
|
|
297
|
-
create_table "identifiers", :
|
298
|
-
t.string "body", :
|
299
|
-
t.integer "identifier_type_id", :
|
313
|
+
create_table "identifiers", force: true do |t|
|
314
|
+
t.string "body", null: false
|
315
|
+
t.integer "identifier_type_id", null: false
|
300
316
|
t.integer "manifestation_id"
|
301
317
|
t.boolean "primary"
|
302
318
|
t.integer "position"
|
303
|
-
t.datetime "created_at"
|
304
|
-
t.datetime "updated_at"
|
319
|
+
t.datetime "created_at"
|
320
|
+
t.datetime "updated_at"
|
305
321
|
end
|
306
322
|
|
307
|
-
add_index "identifiers", ["body", "identifier_type_id"], :
|
308
|
-
add_index "identifiers", ["manifestation_id"], :
|
323
|
+
add_index "identifiers", ["body", "identifier_type_id"], name: "index_identifiers_on_body_and_identifier_type_id"
|
324
|
+
add_index "identifiers", ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
|
309
325
|
|
310
|
-
create_table "import_request_transitions", :
|
326
|
+
create_table "import_request_transitions", force: true do |t|
|
311
327
|
t.string "to_state"
|
312
|
-
t.text "metadata", :
|
328
|
+
t.text "metadata", default: "{}"
|
313
329
|
t.integer "sort_key"
|
314
330
|
t.integer "import_request_id"
|
315
|
-
t.datetime "created_at"
|
316
|
-
t.datetime "updated_at"
|
331
|
+
t.datetime "created_at"
|
332
|
+
t.datetime "updated_at"
|
317
333
|
end
|
318
334
|
|
319
|
-
add_index "import_request_transitions", ["import_request_id"], :
|
320
|
-
add_index "import_request_transitions", ["sort_key", "import_request_id"], :
|
335
|
+
add_index "import_request_transitions", ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
|
336
|
+
add_index "import_request_transitions", ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
|
321
337
|
|
322
|
-
create_table "import_requests", :
|
338
|
+
create_table "import_requests", force: true do |t|
|
323
339
|
t.string "isbn"
|
324
340
|
t.integer "manifestation_id"
|
325
341
|
t.integer "user_id"
|
326
|
-
t.datetime "created_at"
|
327
|
-
t.datetime "updated_at"
|
342
|
+
t.datetime "created_at"
|
343
|
+
t.datetime "updated_at"
|
328
344
|
end
|
329
345
|
|
330
|
-
add_index "import_requests", ["isbn"], :
|
331
|
-
add_index "import_requests", ["manifestation_id"], :
|
332
|
-
add_index "import_requests", ["user_id"], :
|
346
|
+
add_index "import_requests", ["isbn"], name: "index_import_requests_on_isbn"
|
347
|
+
add_index "import_requests", ["manifestation_id"], name: "index_import_requests_on_manifestation_id"
|
348
|
+
add_index "import_requests", ["user_id"], name: "index_import_requests_on_user_id"
|
333
349
|
|
334
|
-
create_table "items", :
|
350
|
+
create_table "items", force: true do |t|
|
335
351
|
t.string "call_number"
|
336
352
|
t.string "item_identifier"
|
337
|
-
t.datetime "created_at"
|
338
|
-
t.datetime "updated_at"
|
353
|
+
t.datetime "created_at"
|
354
|
+
t.datetime "updated_at"
|
339
355
|
t.datetime "deleted_at"
|
340
|
-
t.integer "shelf_id", :
|
341
|
-
t.boolean "include_supplements", :
|
356
|
+
t.integer "shelf_id", default: 1, null: false
|
357
|
+
t.boolean "include_supplements", default: false, null: false
|
342
358
|
t.text "note"
|
343
359
|
t.string "url"
|
344
360
|
t.integer "price"
|
345
|
-
t.integer "lock_version", :
|
346
|
-
t.integer "required_role_id", :
|
347
|
-
t.integer "required_score", :
|
361
|
+
t.integer "lock_version", default: 0, null: false
|
362
|
+
t.integer "required_role_id", default: 1, null: false
|
363
|
+
t.integer "required_score", default: 0, null: false
|
348
364
|
t.datetime "acquired_at"
|
349
365
|
t.integer "bookstore_id"
|
350
366
|
t.integer "budget_type_id"
|
@@ -354,15 +370,15 @@ ActiveRecord::Schema.define(:version => 20140817155043) do
|
|
354
370
|
t.integer "manifestation_id"
|
355
371
|
end
|
356
372
|
|
357
|
-
add_index "items", ["binding_item_identifier"], :
|
358
|
-
add_index "items", ["bookstore_id"], :
|
359
|
-
add_index "items", ["item_identifier"], :
|
360
|
-
add_index "items", ["manifestation_id"], :
|
361
|
-
add_index "items", ["required_role_id"], :
|
362
|
-
add_index "items", ["shelf_id"], :
|
373
|
+
add_index "items", ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
|
374
|
+
add_index "items", ["bookstore_id"], name: "index_items_on_bookstore_id"
|
375
|
+
add_index "items", ["item_identifier"], name: "index_items_on_item_identifier"
|
376
|
+
add_index "items", ["manifestation_id"], name: "index_items_on_manifestation_id"
|
377
|
+
add_index "items", ["required_role_id"], name: "index_items_on_required_role_id"
|
378
|
+
add_index "items", ["shelf_id"], name: "index_items_on_shelf_id"
|
363
379
|
|
364
|
-
create_table "languages", :
|
365
|
-
t.string "name", :
|
380
|
+
create_table "languages", force: true do |t|
|
381
|
+
t.string "name", null: false
|
366
382
|
t.string "native_name"
|
367
383
|
t.text "display_name"
|
368
384
|
t.string "iso_639_1"
|
@@ -372,15 +388,15 @@ ActiveRecord::Schema.define(:version => 20140817155043) do
|
|
372
388
|
t.integer "position"
|
373
389
|
end
|
374
390
|
|
375
|
-
add_index "languages", ["iso_639_1"], :
|
376
|
-
add_index "languages", ["iso_639_2"], :
|
377
|
-
add_index "languages", ["iso_639_3"], :
|
378
|
-
add_index "languages", ["name"], :
|
391
|
+
add_index "languages", ["iso_639_1"], name: "index_languages_on_iso_639_1"
|
392
|
+
add_index "languages", ["iso_639_2"], name: "index_languages_on_iso_639_2"
|
393
|
+
add_index "languages", ["iso_639_3"], name: "index_languages_on_iso_639_3"
|
394
|
+
add_index "languages", ["name"], name: "index_languages_on_name", unique: true
|
379
395
|
|
380
|
-
create_table "libraries", :
|
381
|
-
t.string "name",
|
396
|
+
create_table "libraries", force: true do |t|
|
397
|
+
t.string "name", null: false
|
382
398
|
t.text "display_name"
|
383
|
-
t.string "short_display_name",
|
399
|
+
t.string "short_display_name", null: false
|
384
400
|
t.string "zip_code"
|
385
401
|
t.text "street"
|
386
402
|
t.text "locality"
|
@@ -389,14 +405,14 @@ ActiveRecord::Schema.define(:version => 20140817155043) do
|
|
389
405
|
t.string "telephone_number_2"
|
390
406
|
t.string "fax_number"
|
391
407
|
t.text "note"
|
392
|
-
t.integer "call_number_rows", :
|
393
|
-
t.string "call_number_delimiter", :
|
394
|
-
t.integer "library_group_id", :
|
395
|
-
t.integer "users_count", :
|
408
|
+
t.integer "call_number_rows", default: 1, null: false
|
409
|
+
t.string "call_number_delimiter", default: "|", null: false
|
410
|
+
t.integer "library_group_id", default: 1, null: false
|
411
|
+
t.integer "users_count", default: 0, null: false
|
396
412
|
t.integer "position"
|
397
413
|
t.integer "country_id"
|
398
|
-
t.datetime "created_at"
|
399
|
-
t.datetime "updated_at"
|
414
|
+
t.datetime "created_at"
|
415
|
+
t.datetime "updated_at"
|
400
416
|
t.datetime "deleted_at"
|
401
417
|
t.text "opening_hour"
|
402
418
|
t.string "isil"
|
@@ -404,71 +420,70 @@ ActiveRecord::Schema.define(:version => 20140817155043) do
|
|
404
420
|
t.float "longitude"
|
405
421
|
end
|
406
422
|
|
407
|
-
add_index "libraries", ["library_group_id"], :
|
408
|
-
add_index "libraries", ["name"], :
|
423
|
+
add_index "libraries", ["library_group_id"], name: "index_libraries_on_library_group_id"
|
424
|
+
add_index "libraries", ["name"], name: "index_libraries_on_name", unique: true
|
409
425
|
|
410
|
-
create_table "library_groups", :
|
411
|
-
t.string "name",
|
426
|
+
create_table "library_groups", force: true do |t|
|
427
|
+
t.string "name", null: false
|
412
428
|
t.text "display_name"
|
413
|
-
t.string "short_name",
|
429
|
+
t.string "short_name", null: false
|
414
430
|
t.text "my_networks"
|
415
431
|
t.text "login_banner"
|
416
432
|
t.text "note"
|
417
433
|
t.integer "country_id"
|
418
434
|
t.integer "position"
|
419
|
-
t.datetime "created_at"
|
420
|
-
t.datetime "updated_at"
|
435
|
+
t.datetime "created_at"
|
436
|
+
t.datetime "updated_at"
|
421
437
|
t.text "admin_networks"
|
422
|
-
t.string "url", :
|
438
|
+
t.string "url", default: "http://localhost:3000/"
|
423
439
|
end
|
424
440
|
|
425
|
-
add_index "library_groups", ["short_name"], :
|
441
|
+
add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
|
426
442
|
|
427
|
-
create_table "licenses", :
|
428
|
-
t.string "name", :
|
443
|
+
create_table "licenses", force: true do |t|
|
444
|
+
t.string "name", null: false
|
429
445
|
t.string "display_name"
|
430
446
|
t.text "note"
|
431
447
|
t.integer "position"
|
432
|
-
t.datetime "created_at"
|
433
|
-
t.datetime "updated_at"
|
448
|
+
t.datetime "created_at"
|
449
|
+
t.datetime "updated_at"
|
434
450
|
end
|
435
451
|
|
436
|
-
create_table "manifestation_relationship_types", :
|
437
|
-
t.string "name", :
|
452
|
+
create_table "manifestation_relationship_types", force: true do |t|
|
453
|
+
t.string "name", null: false
|
438
454
|
t.text "display_name"
|
439
455
|
t.text "note"
|
440
456
|
t.integer "position"
|
441
|
-
t.datetime "created_at"
|
442
|
-
t.datetime "updated_at"
|
457
|
+
t.datetime "created_at"
|
458
|
+
t.datetime "updated_at"
|
443
459
|
end
|
444
460
|
|
445
|
-
create_table "manifestation_relationships", :
|
461
|
+
create_table "manifestation_relationships", force: true do |t|
|
446
462
|
t.integer "parent_id"
|
447
463
|
t.integer "child_id"
|
448
464
|
t.integer "manifestation_relationship_type_id"
|
449
|
-
t.datetime "created_at"
|
450
|
-
t.datetime "updated_at"
|
465
|
+
t.datetime "created_at"
|
466
|
+
t.datetime "updated_at"
|
451
467
|
t.integer "position"
|
452
468
|
end
|
453
469
|
|
454
|
-
add_index "manifestation_relationships", ["child_id"], :
|
455
|
-
add_index "manifestation_relationships", ["parent_id"], :
|
470
|
+
add_index "manifestation_relationships", ["child_id"], name: "index_manifestation_relationships_on_child_id"
|
471
|
+
add_index "manifestation_relationships", ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
|
456
472
|
|
457
|
-
create_table "manifestations", :
|
458
|
-
t.text "original_title",
|
473
|
+
create_table "manifestations", force: true do |t|
|
474
|
+
t.text "original_title", null: false
|
459
475
|
t.text "title_alternative"
|
460
476
|
t.text "title_transcription"
|
461
477
|
t.string "classification_number"
|
462
478
|
t.string "manifestation_identifier"
|
463
479
|
t.datetime "date_of_publication"
|
464
480
|
t.datetime "date_copyrighted"
|
465
|
-
t.datetime "created_at"
|
466
|
-
t.datetime "updated_at"
|
481
|
+
t.datetime "created_at"
|
482
|
+
t.datetime "updated_at"
|
467
483
|
t.datetime "deleted_at"
|
468
484
|
t.string "access_address"
|
469
|
-
t.integer "language_id", :
|
470
|
-
t.integer "carrier_type_id", :
|
471
|
-
t.integer "extent_id", :default => 1, :null => false
|
485
|
+
t.integer "language_id", default: 1, null: false
|
486
|
+
t.integer "carrier_type_id", default: 1, null: false
|
472
487
|
t.integer "start_page"
|
473
488
|
t.integer "end_page"
|
474
489
|
t.integer "height"
|
@@ -481,12 +496,12 @@ ActiveRecord::Schema.define(:version => 20140817155043) do
|
|
481
496
|
t.string "serial_number_string"
|
482
497
|
t.integer "edition"
|
483
498
|
t.text "note"
|
484
|
-
t.boolean "repository_content", :
|
485
|
-
t.integer "lock_version", :
|
486
|
-
t.integer "required_role_id", :
|
487
|
-
t.integer "required_score", :
|
488
|
-
t.integer "frequency_id", :
|
489
|
-
t.boolean "subscription_master", :
|
499
|
+
t.boolean "repository_content", default: false, null: false
|
500
|
+
t.integer "lock_version", default: 0, null: false
|
501
|
+
t.integer "required_role_id", default: 1, null: false
|
502
|
+
t.integer "required_score", default: 0, null: false
|
503
|
+
t.integer "frequency_id", default: 1, null: false
|
504
|
+
t.boolean "subscription_master", default: false, null: false
|
490
505
|
t.string "attachment_file_name"
|
491
506
|
t.string "attachment_content_type"
|
492
507
|
t.integer "attachment_file_size"
|
@@ -504,118 +519,120 @@ ActiveRecord::Schema.define(:version => 20140817155043) do
|
|
504
519
|
t.integer "volume_number"
|
505
520
|
t.integer "issue_number"
|
506
521
|
t.integer "serial_number"
|
507
|
-
t.integer "content_type_id", :
|
522
|
+
t.integer "content_type_id", default: 1
|
508
523
|
t.integer "year_of_publication"
|
509
524
|
t.text "attachment_meta"
|
510
525
|
t.integer "month_of_publication"
|
511
526
|
t.boolean "fulltext_content"
|
512
|
-
t.boolean "
|
527
|
+
t.boolean "serial"
|
513
528
|
t.text "statement_of_responsibility"
|
514
529
|
t.text "publication_place"
|
515
530
|
t.text "extent_of_text"
|
531
|
+
t.text "extent"
|
532
|
+
t.text "dimensions"
|
516
533
|
end
|
517
534
|
|
518
|
-
add_index "manifestations", ["access_address"], :
|
519
|
-
add_index "manifestations", ["date_of_publication"], :
|
520
|
-
add_index "manifestations", ["manifestation_identifier"], :
|
521
|
-
add_index "manifestations", ["updated_at"], :
|
535
|
+
add_index "manifestations", ["access_address"], name: "index_manifestations_on_access_address"
|
536
|
+
add_index "manifestations", ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
|
537
|
+
add_index "manifestations", ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier"
|
538
|
+
add_index "manifestations", ["updated_at"], name: "index_manifestations_on_updated_at"
|
522
539
|
|
523
|
-
create_table "medium_of_performances", :
|
524
|
-
t.string "name", :
|
540
|
+
create_table "medium_of_performances", force: true do |t|
|
541
|
+
t.string "name", null: false
|
525
542
|
t.text "display_name"
|
526
543
|
t.text "note"
|
527
544
|
t.integer "position"
|
528
|
-
t.datetime "created_at"
|
529
|
-
t.datetime "updated_at"
|
545
|
+
t.datetime "created_at"
|
546
|
+
t.datetime "updated_at"
|
530
547
|
end
|
531
548
|
|
532
|
-
create_table "message_request_transitions", :
|
549
|
+
create_table "message_request_transitions", force: true do |t|
|
533
550
|
t.string "to_state"
|
534
|
-
t.text "metadata", :
|
551
|
+
t.text "metadata", default: "{}"
|
535
552
|
t.integer "sort_key"
|
536
553
|
t.integer "message_request_id"
|
537
|
-
t.datetime "created_at"
|
538
|
-
t.datetime "updated_at"
|
554
|
+
t.datetime "created_at"
|
555
|
+
t.datetime "updated_at"
|
539
556
|
end
|
540
557
|
|
541
|
-
add_index "message_request_transitions", ["message_request_id"], :
|
542
|
-
add_index "message_request_transitions", ["sort_key", "message_request_id"], :
|
558
|
+
add_index "message_request_transitions", ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
|
559
|
+
add_index "message_request_transitions", ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
|
543
560
|
|
544
|
-
create_table "message_requests", :
|
561
|
+
create_table "message_requests", force: true do |t|
|
545
562
|
t.integer "sender_id"
|
546
563
|
t.integer "receiver_id"
|
547
564
|
t.integer "message_template_id"
|
548
565
|
t.datetime "sent_at"
|
549
566
|
t.datetime "deleted_at"
|
550
567
|
t.text "body"
|
551
|
-
t.datetime "created_at"
|
552
|
-
t.datetime "updated_at"
|
568
|
+
t.datetime "created_at"
|
569
|
+
t.datetime "updated_at"
|
553
570
|
end
|
554
571
|
|
555
|
-
create_table "message_templates", :
|
556
|
-
t.string "status",
|
557
|
-
t.text "title",
|
558
|
-
t.text "body",
|
572
|
+
create_table "message_templates", force: true do |t|
|
573
|
+
t.string "status", null: false
|
574
|
+
t.text "title", null: false
|
575
|
+
t.text "body", null: false
|
559
576
|
t.integer "position"
|
560
|
-
t.string "locale", :
|
561
|
-
t.datetime "created_at"
|
562
|
-
t.datetime "updated_at"
|
577
|
+
t.string "locale", default: "en"
|
578
|
+
t.datetime "created_at"
|
579
|
+
t.datetime "updated_at"
|
563
580
|
end
|
564
581
|
|
565
|
-
add_index "message_templates", ["status"], :
|
582
|
+
add_index "message_templates", ["status"], name: "index_message_templates_on_status", unique: true
|
566
583
|
|
567
|
-
create_table "message_transitions", :
|
584
|
+
create_table "message_transitions", force: true do |t|
|
568
585
|
t.string "to_state"
|
569
|
-
t.text "metadata", :
|
586
|
+
t.text "metadata", default: "{}"
|
570
587
|
t.integer "sort_key"
|
571
588
|
t.integer "message_id"
|
572
|
-
t.datetime "created_at"
|
573
|
-
t.datetime "updated_at"
|
589
|
+
t.datetime "created_at"
|
590
|
+
t.datetime "updated_at"
|
574
591
|
end
|
575
592
|
|
576
|
-
add_index "message_transitions", ["message_id"], :
|
577
|
-
add_index "message_transitions", ["sort_key", "message_id"], :
|
593
|
+
add_index "message_transitions", ["message_id"], name: "index_message_transitions_on_message_id"
|
594
|
+
add_index "message_transitions", ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
|
578
595
|
|
579
|
-
create_table "messages", :
|
596
|
+
create_table "messages", force: true do |t|
|
580
597
|
t.datetime "read_at"
|
581
598
|
t.integer "receiver_id"
|
582
599
|
t.integer "sender_id"
|
583
|
-
t.string "subject", :
|
600
|
+
t.string "subject", null: false
|
584
601
|
t.text "body"
|
585
602
|
t.integer "message_request_id"
|
586
603
|
t.integer "parent_id"
|
587
|
-
t.datetime "created_at"
|
588
|
-
t.datetime "updated_at"
|
604
|
+
t.datetime "created_at"
|
605
|
+
t.datetime "updated_at"
|
589
606
|
t.integer "lft"
|
590
607
|
t.integer "rgt"
|
591
608
|
t.integer "depth"
|
592
609
|
end
|
593
610
|
|
594
|
-
add_index "messages", ["message_request_id"], :
|
595
|
-
add_index "messages", ["parent_id"], :
|
596
|
-
add_index "messages", ["receiver_id"], :
|
597
|
-
add_index "messages", ["sender_id"], :
|
611
|
+
add_index "messages", ["message_request_id"], name: "index_messages_on_message_request_id"
|
612
|
+
add_index "messages", ["parent_id"], name: "index_messages_on_parent_id"
|
613
|
+
add_index "messages", ["receiver_id"], name: "index_messages_on_receiver_id"
|
614
|
+
add_index "messages", ["sender_id"], name: "index_messages_on_sender_id"
|
598
615
|
|
599
|
-
create_table "owns", :
|
600
|
-
t.integer "agent_id", :
|
601
|
-
t.integer "item_id", :
|
616
|
+
create_table "owns", force: true do |t|
|
617
|
+
t.integer "agent_id", null: false
|
618
|
+
t.integer "item_id", null: false
|
602
619
|
t.integer "position"
|
603
|
-
t.datetime "created_at"
|
604
|
-
t.datetime "updated_at"
|
620
|
+
t.datetime "created_at"
|
621
|
+
t.datetime "updated_at"
|
605
622
|
end
|
606
623
|
|
607
|
-
add_index "owns", ["agent_id"], :
|
608
|
-
add_index "owns", ["item_id"], :
|
624
|
+
add_index "owns", ["agent_id"], name: "index_owns_on_agent_id"
|
625
|
+
add_index "owns", ["item_id"], name: "index_owns_on_item_id"
|
609
626
|
|
610
|
-
create_table "picture_files", :
|
627
|
+
create_table "picture_files", force: true do |t|
|
611
628
|
t.integer "picture_attachable_id"
|
612
629
|
t.string "picture_attachable_type"
|
613
630
|
t.string "content_type"
|
614
631
|
t.text "title"
|
615
632
|
t.string "thumbnail"
|
616
633
|
t.integer "position"
|
617
|
-
t.datetime "created_at"
|
618
|
-
t.datetime "updated_at"
|
634
|
+
t.datetime "created_at"
|
635
|
+
t.datetime "updated_at"
|
619
636
|
t.string "picture_file_name"
|
620
637
|
t.string "picture_content_type"
|
621
638
|
t.integer "picture_file_size"
|
@@ -624,30 +641,30 @@ ActiveRecord::Schema.define(:version => 20140817155043) do
|
|
624
641
|
t.string "picture_fingerprint"
|
625
642
|
end
|
626
643
|
|
627
|
-
add_index "picture_files", ["picture_attachable_id", "picture_attachable_type"], :
|
644
|
+
add_index "picture_files", ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
|
628
645
|
|
629
|
-
create_table "produce_types", :
|
646
|
+
create_table "produce_types", force: true do |t|
|
630
647
|
t.string "name"
|
631
648
|
t.text "display_name"
|
632
649
|
t.text "note"
|
633
650
|
t.integer "position"
|
634
|
-
t.datetime "created_at"
|
635
|
-
t.datetime "updated_at"
|
651
|
+
t.datetime "created_at"
|
652
|
+
t.datetime "updated_at"
|
636
653
|
end
|
637
654
|
|
638
|
-
create_table "produces", :
|
639
|
-
t.integer "agent_id", :
|
640
|
-
t.integer "manifestation_id", :
|
655
|
+
create_table "produces", force: true do |t|
|
656
|
+
t.integer "agent_id", null: false
|
657
|
+
t.integer "manifestation_id", null: false
|
641
658
|
t.integer "position"
|
642
|
-
t.datetime "created_at"
|
643
|
-
t.datetime "updated_at"
|
659
|
+
t.datetime "created_at"
|
660
|
+
t.datetime "updated_at"
|
644
661
|
t.integer "produce_type_id"
|
645
662
|
end
|
646
663
|
|
647
|
-
add_index "produces", ["agent_id"], :
|
648
|
-
add_index "produces", ["manifestation_id"], :
|
664
|
+
add_index "produces", ["agent_id"], name: "index_produces_on_agent_id"
|
665
|
+
add_index "produces", ["manifestation_id"], name: "index_produces_on_manifestation_id"
|
649
666
|
|
650
|
-
create_table "profiles", :
|
667
|
+
create_table "profiles", force: true do |t|
|
651
668
|
t.integer "user_id"
|
652
669
|
t.integer "user_group_id"
|
653
670
|
t.integer "library_id"
|
@@ -657,89 +674,91 @@ ActiveRecord::Schema.define(:version => 20140817155043) do
|
|
657
674
|
t.text "note"
|
658
675
|
t.text "keyword_list"
|
659
676
|
t.integer "required_role_id"
|
660
|
-
t.datetime "created_at"
|
661
|
-
t.datetime "updated_at"
|
677
|
+
t.datetime "created_at"
|
678
|
+
t.datetime "updated_at"
|
662
679
|
t.datetime "expired_at"
|
680
|
+
t.text "full_name_transcription"
|
681
|
+
t.datetime "date_of_birth"
|
663
682
|
end
|
664
683
|
|
665
|
-
add_index "profiles", ["user_id"], :
|
666
|
-
add_index "profiles", ["user_number"], :
|
684
|
+
add_index "profiles", ["user_id"], name: "index_profiles_on_user_id"
|
685
|
+
add_index "profiles", ["user_number"], name: "index_profiles_on_user_number", unique: true
|
667
686
|
|
668
|
-
create_table "realize_types", :
|
687
|
+
create_table "realize_types", force: true do |t|
|
669
688
|
t.string "name"
|
670
689
|
t.text "display_name"
|
671
690
|
t.text "note"
|
672
691
|
t.integer "position"
|
673
|
-
t.datetime "created_at"
|
674
|
-
t.datetime "updated_at"
|
692
|
+
t.datetime "created_at"
|
693
|
+
t.datetime "updated_at"
|
675
694
|
end
|
676
695
|
|
677
|
-
create_table "realizes", :
|
678
|
-
t.integer "agent_id", :
|
679
|
-
t.integer "expression_id", :
|
696
|
+
create_table "realizes", force: true do |t|
|
697
|
+
t.integer "agent_id", null: false
|
698
|
+
t.integer "expression_id", null: false
|
680
699
|
t.integer "position"
|
681
|
-
t.datetime "created_at"
|
682
|
-
t.datetime "updated_at"
|
700
|
+
t.datetime "created_at"
|
701
|
+
t.datetime "updated_at"
|
683
702
|
t.integer "realize_type_id"
|
684
703
|
end
|
685
704
|
|
686
|
-
add_index "realizes", ["agent_id"], :
|
687
|
-
add_index "realizes", ["expression_id"], :
|
705
|
+
add_index "realizes", ["agent_id"], name: "index_realizes_on_agent_id"
|
706
|
+
add_index "realizes", ["expression_id"], name: "index_realizes_on_expression_id"
|
688
707
|
|
689
|
-
create_table "request_status_types", :
|
690
|
-
t.string "name", :
|
708
|
+
create_table "request_status_types", force: true do |t|
|
709
|
+
t.string "name", null: false
|
691
710
|
t.text "display_name"
|
692
711
|
t.text "note"
|
693
712
|
t.integer "position"
|
694
|
-
t.datetime "created_at"
|
695
|
-
t.datetime "updated_at"
|
713
|
+
t.datetime "created_at"
|
714
|
+
t.datetime "updated_at"
|
696
715
|
end
|
697
716
|
|
698
|
-
create_table "request_types", :
|
699
|
-
t.string "name", :
|
717
|
+
create_table "request_types", force: true do |t|
|
718
|
+
t.string "name", null: false
|
700
719
|
t.text "display_name"
|
701
720
|
t.text "note"
|
702
721
|
t.integer "position"
|
703
|
-
t.datetime "created_at"
|
704
|
-
t.datetime "updated_at"
|
722
|
+
t.datetime "created_at"
|
723
|
+
t.datetime "updated_at"
|
705
724
|
end
|
706
725
|
|
707
|
-
create_table "resource_export_file_transitions", :
|
726
|
+
create_table "resource_export_file_transitions", force: true do |t|
|
708
727
|
t.string "to_state"
|
709
|
-
t.text "metadata", :
|
728
|
+
t.text "metadata", default: "{}"
|
710
729
|
t.integer "sort_key"
|
711
730
|
t.integer "resource_export_file_id"
|
712
|
-
t.datetime "created_at"
|
713
|
-
t.datetime "updated_at"
|
731
|
+
t.datetime "created_at"
|
732
|
+
t.datetime "updated_at"
|
714
733
|
end
|
715
734
|
|
716
|
-
add_index "resource_export_file_transitions", ["resource_export_file_id"], :
|
717
|
-
add_index "resource_export_file_transitions", ["sort_key", "resource_export_file_id"], :
|
735
|
+
add_index "resource_export_file_transitions", ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
|
736
|
+
add_index "resource_export_file_transitions", ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
|
718
737
|
|
719
|
-
create_table "resource_export_files", :
|
738
|
+
create_table "resource_export_files", force: true do |t|
|
720
739
|
t.integer "user_id"
|
721
740
|
t.string "resource_export_file_name"
|
722
741
|
t.string "resource_export_content_type"
|
723
742
|
t.integer "resource_export_file_size"
|
724
743
|
t.datetime "resource_export_updated_at"
|
725
744
|
t.datetime "executed_at"
|
726
|
-
t.datetime "created_at"
|
727
|
-
t.datetime "updated_at"
|
745
|
+
t.datetime "created_at"
|
746
|
+
t.datetime "updated_at"
|
728
747
|
end
|
729
748
|
|
730
|
-
create_table "resource_import_file_transitions", :
|
749
|
+
create_table "resource_import_file_transitions", force: true do |t|
|
731
750
|
t.string "to_state"
|
732
|
-
t.text "metadata", :
|
751
|
+
t.text "metadata", default: "{}"
|
733
752
|
t.integer "sort_key"
|
734
753
|
t.integer "resource_import_file_id"
|
735
|
-
t.datetime "created_at"
|
736
|
-
t.datetime "updated_at"
|
754
|
+
t.datetime "created_at"
|
755
|
+
t.datetime "updated_at"
|
737
756
|
end
|
738
757
|
|
739
|
-
add_index "resource_import_file_transitions", ["resource_import_file_id"], :
|
740
|
-
add_index "resource_import_file_transitions", ["sort_key", "resource_import_file_id"], :
|
758
|
+
add_index "resource_import_file_transitions", ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
|
759
|
+
add_index "resource_import_file_transitions", ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
|
741
760
|
|
742
|
-
create_table "resource_import_files", :
|
761
|
+
create_table "resource_import_files", force: true do |t|
|
743
762
|
t.integer "parent_id"
|
744
763
|
t.string "content_type"
|
745
764
|
t.integer "size"
|
@@ -750,8 +769,8 @@ ActiveRecord::Schema.define(:version => 20140817155043) do
|
|
750
769
|
t.string "resource_import_content_type"
|
751
770
|
t.integer "resource_import_file_size"
|
752
771
|
t.datetime "resource_import_updated_at"
|
753
|
-
t.datetime "created_at"
|
754
|
-
t.datetime "updated_at"
|
772
|
+
t.datetime "created_at"
|
773
|
+
t.datetime "updated_at"
|
755
774
|
t.string "edit_mode"
|
756
775
|
t.string "resource_import_fingerprint"
|
757
776
|
t.text "error_message"
|
@@ -759,70 +778,71 @@ ActiveRecord::Schema.define(:version => 20140817155043) do
|
|
759
778
|
t.integer "default_shelf_id"
|
760
779
|
end
|
761
780
|
|
762
|
-
add_index "resource_import_files", ["parent_id"], :
|
763
|
-
add_index "resource_import_files", ["user_id"], :
|
781
|
+
add_index "resource_import_files", ["parent_id"], name: "index_resource_import_files_on_parent_id"
|
782
|
+
add_index "resource_import_files", ["user_id"], name: "index_resource_import_files_on_user_id"
|
764
783
|
|
765
|
-
create_table "resource_import_results", :
|
784
|
+
create_table "resource_import_results", force: true do |t|
|
766
785
|
t.integer "resource_import_file_id"
|
767
786
|
t.integer "manifestation_id"
|
768
787
|
t.integer "item_id"
|
769
788
|
t.text "body"
|
770
|
-
t.datetime "created_at"
|
771
|
-
t.datetime "updated_at"
|
789
|
+
t.datetime "created_at"
|
790
|
+
t.datetime "updated_at"
|
791
|
+
t.text "error_message"
|
772
792
|
end
|
773
793
|
|
774
|
-
add_index "resource_import_results", ["item_id"], :
|
775
|
-
add_index "resource_import_results", ["manifestation_id"], :
|
776
|
-
add_index "resource_import_results", ["resource_import_file_id"], :
|
794
|
+
add_index "resource_import_results", ["item_id"], name: "index_resource_import_results_on_item_id"
|
795
|
+
add_index "resource_import_results", ["manifestation_id"], name: "index_resource_import_results_on_manifestation_id"
|
796
|
+
add_index "resource_import_results", ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
|
777
797
|
|
778
|
-
create_table "roles", :
|
779
|
-
t.string "name",
|
798
|
+
create_table "roles", force: true do |t|
|
799
|
+
t.string "name", null: false
|
780
800
|
t.string "display_name"
|
781
801
|
t.text "note"
|
782
802
|
t.datetime "created_at"
|
783
803
|
t.datetime "updated_at"
|
784
|
-
t.integer "score", :
|
804
|
+
t.integer "score", default: 0, null: false
|
785
805
|
t.integer "position"
|
786
806
|
end
|
787
807
|
|
788
|
-
create_table "search_engines", :
|
789
|
-
t.string "name", :
|
808
|
+
create_table "search_engines", force: true do |t|
|
809
|
+
t.string "name", null: false
|
790
810
|
t.text "display_name"
|
791
|
-
t.string "url", :
|
792
|
-
t.text "base_url", :
|
793
|
-
t.text "http_method", :
|
794
|
-
t.text "query_param", :
|
811
|
+
t.string "url", null: false
|
812
|
+
t.text "base_url", null: false
|
813
|
+
t.text "http_method", null: false
|
814
|
+
t.text "query_param", null: false
|
795
815
|
t.text "additional_param"
|
796
816
|
t.text "note"
|
797
817
|
t.integer "position"
|
798
|
-
t.datetime "created_at"
|
799
|
-
t.datetime "updated_at"
|
818
|
+
t.datetime "created_at"
|
819
|
+
t.datetime "updated_at"
|
800
820
|
end
|
801
821
|
|
802
|
-
create_table "series_statement_merge_lists", :
|
822
|
+
create_table "series_statement_merge_lists", force: true do |t|
|
803
823
|
t.string "title"
|
804
|
-
t.datetime "created_at"
|
805
|
-
t.datetime "updated_at"
|
824
|
+
t.datetime "created_at"
|
825
|
+
t.datetime "updated_at"
|
806
826
|
end
|
807
827
|
|
808
|
-
create_table "series_statement_merges", :
|
809
|
-
t.integer "series_statement_id", :
|
810
|
-
t.integer "series_statement_merge_list_id", :
|
811
|
-
t.datetime "created_at"
|
812
|
-
t.datetime "updated_at"
|
828
|
+
create_table "series_statement_merges", force: true do |t|
|
829
|
+
t.integer "series_statement_id", null: false
|
830
|
+
t.integer "series_statement_merge_list_id", null: false
|
831
|
+
t.datetime "created_at"
|
832
|
+
t.datetime "updated_at"
|
813
833
|
end
|
814
834
|
|
815
|
-
add_index "series_statement_merges", ["series_statement_id"], :
|
816
|
-
add_index "series_statement_merges", ["series_statement_merge_list_id"], :
|
835
|
+
add_index "series_statement_merges", ["series_statement_id"], name: "index_series_statement_merges_on_series_statement_id"
|
836
|
+
add_index "series_statement_merges", ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id"
|
817
837
|
|
818
|
-
create_table "series_statements", :
|
838
|
+
create_table "series_statements", force: true do |t|
|
819
839
|
t.text "original_title"
|
820
840
|
t.text "numbering"
|
821
841
|
t.text "title_subseries"
|
822
842
|
t.text "numbering_subseries"
|
823
843
|
t.integer "position"
|
824
|
-
t.datetime "created_at"
|
825
|
-
t.datetime "updated_at"
|
844
|
+
t.datetime "created_at"
|
845
|
+
t.datetime "updated_at"
|
826
846
|
t.text "title_transcription"
|
827
847
|
t.text "title_alternative"
|
828
848
|
t.string "series_statement_identifier"
|
@@ -836,109 +856,109 @@ ActiveRecord::Schema.define(:version => 20140817155043) do
|
|
836
856
|
t.integer "root_manifestation_id"
|
837
857
|
end
|
838
858
|
|
839
|
-
add_index "series_statements", ["manifestation_id"], :
|
840
|
-
add_index "series_statements", ["root_manifestation_id"], :
|
841
|
-
add_index "series_statements", ["series_statement_identifier"], :
|
859
|
+
add_index "series_statements", ["manifestation_id"], name: "index_series_statements_on_manifestation_id"
|
860
|
+
add_index "series_statements", ["root_manifestation_id"], name: "index_series_statements_on_root_manifestation_id"
|
861
|
+
add_index "series_statements", ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
|
842
862
|
|
843
|
-
create_table "shelves", :
|
844
|
-
t.string "name",
|
863
|
+
create_table "shelves", force: true do |t|
|
864
|
+
t.string "name", null: false
|
845
865
|
t.text "display_name"
|
846
866
|
t.text "note"
|
847
|
-
t.integer "library_id", :
|
848
|
-
t.integer "items_count", :
|
867
|
+
t.integer "library_id", default: 1, null: false
|
868
|
+
t.integer "items_count", default: 0, null: false
|
849
869
|
t.integer "position"
|
850
|
-
t.datetime "created_at"
|
851
|
-
t.datetime "updated_at"
|
870
|
+
t.datetime "created_at"
|
871
|
+
t.datetime "updated_at"
|
852
872
|
t.datetime "deleted_at"
|
853
|
-
t.boolean "closed", :
|
873
|
+
t.boolean "closed", default: false, null: false
|
854
874
|
end
|
855
875
|
|
856
|
-
add_index "shelves", ["library_id"], :
|
876
|
+
add_index "shelves", ["library_id"], name: "index_shelves_on_library_id"
|
857
877
|
|
858
|
-
create_table "subscribes", :
|
859
|
-
t.integer "subscription_id", :
|
860
|
-
t.integer "work_id", :
|
861
|
-
t.datetime "start_at", :
|
862
|
-
t.datetime "end_at", :
|
863
|
-
t.datetime "created_at"
|
864
|
-
t.datetime "updated_at"
|
878
|
+
create_table "subscribes", force: true do |t|
|
879
|
+
t.integer "subscription_id", null: false
|
880
|
+
t.integer "work_id", null: false
|
881
|
+
t.datetime "start_at", null: false
|
882
|
+
t.datetime "end_at", null: false
|
883
|
+
t.datetime "created_at"
|
884
|
+
t.datetime "updated_at"
|
865
885
|
end
|
866
886
|
|
867
|
-
add_index "subscribes", ["subscription_id"], :
|
868
|
-
add_index "subscribes", ["work_id"], :
|
887
|
+
add_index "subscribes", ["subscription_id"], name: "index_subscribes_on_subscription_id"
|
888
|
+
add_index "subscribes", ["work_id"], name: "index_subscribes_on_work_id"
|
869
889
|
|
870
|
-
create_table "subscriptions", :
|
871
|
-
t.text "title",
|
890
|
+
create_table "subscriptions", force: true do |t|
|
891
|
+
t.text "title", null: false
|
872
892
|
t.text "note"
|
873
893
|
t.integer "user_id"
|
874
894
|
t.integer "order_list_id"
|
875
895
|
t.datetime "deleted_at"
|
876
|
-
t.integer "subscribes_count", :
|
877
|
-
t.datetime "created_at"
|
878
|
-
t.datetime "updated_at"
|
896
|
+
t.integer "subscribes_count", default: 0, null: false
|
897
|
+
t.datetime "created_at"
|
898
|
+
t.datetime "updated_at"
|
879
899
|
end
|
880
900
|
|
881
|
-
add_index "subscriptions", ["order_list_id"], :
|
882
|
-
add_index "subscriptions", ["user_id"], :
|
901
|
+
add_index "subscriptions", ["order_list_id"], name: "index_subscriptions_on_order_list_id"
|
902
|
+
add_index "subscriptions", ["user_id"], name: "index_subscriptions_on_user_id"
|
883
903
|
|
884
|
-
create_table "user_export_file_transitions", :
|
904
|
+
create_table "user_export_file_transitions", force: true do |t|
|
885
905
|
t.string "to_state"
|
886
|
-
t.text "metadata", :
|
906
|
+
t.text "metadata", default: "{}"
|
887
907
|
t.integer "sort_key"
|
888
908
|
t.integer "user_export_file_id"
|
889
|
-
t.datetime "created_at"
|
890
|
-
t.datetime "updated_at"
|
909
|
+
t.datetime "created_at"
|
910
|
+
t.datetime "updated_at"
|
891
911
|
end
|
892
912
|
|
893
|
-
add_index "user_export_file_transitions", ["sort_key", "user_export_file_id"], :
|
894
|
-
add_index "user_export_file_transitions", ["user_export_file_id"], :
|
913
|
+
add_index "user_export_file_transitions", ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
|
914
|
+
add_index "user_export_file_transitions", ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
|
895
915
|
|
896
|
-
create_table "user_export_files", :
|
916
|
+
create_table "user_export_files", force: true do |t|
|
897
917
|
t.integer "user_id"
|
898
918
|
t.string "user_export_file_name"
|
899
919
|
t.string "user_export_content_type"
|
900
920
|
t.integer "user_export_file_size"
|
901
921
|
t.datetime "user_export_updated_at"
|
902
922
|
t.datetime "executed_at"
|
903
|
-
t.datetime "created_at"
|
904
|
-
t.datetime "updated_at"
|
923
|
+
t.datetime "created_at"
|
924
|
+
t.datetime "updated_at"
|
905
925
|
end
|
906
926
|
|
907
|
-
create_table "user_groups", :
|
927
|
+
create_table "user_groups", force: true do |t|
|
908
928
|
t.string "name"
|
909
929
|
t.text "display_name"
|
910
930
|
t.text "note"
|
911
931
|
t.integer "position"
|
912
|
-
t.datetime "created_at"
|
913
|
-
t.datetime "updated_at"
|
932
|
+
t.datetime "created_at"
|
933
|
+
t.datetime "updated_at"
|
914
934
|
t.datetime "deleted_at"
|
915
|
-
t.integer "valid_period_for_new_user", :
|
935
|
+
t.integer "valid_period_for_new_user", default: 0, null: false
|
916
936
|
t.datetime "expired_at"
|
917
937
|
end
|
918
938
|
|
919
|
-
create_table "user_has_roles", :
|
939
|
+
create_table "user_has_roles", force: true do |t|
|
920
940
|
t.integer "user_id"
|
921
941
|
t.integer "role_id"
|
922
|
-
t.datetime "created_at"
|
923
|
-
t.datetime "updated_at"
|
942
|
+
t.datetime "created_at"
|
943
|
+
t.datetime "updated_at"
|
924
944
|
end
|
925
945
|
|
926
|
-
add_index "user_has_roles", ["role_id"], :
|
927
|
-
add_index "user_has_roles", ["user_id"], :
|
946
|
+
add_index "user_has_roles", ["role_id"], name: "index_user_has_roles_on_role_id"
|
947
|
+
add_index "user_has_roles", ["user_id"], name: "index_user_has_roles_on_user_id"
|
928
948
|
|
929
|
-
create_table "user_import_file_transitions", :
|
949
|
+
create_table "user_import_file_transitions", force: true do |t|
|
930
950
|
t.string "to_state"
|
931
|
-
t.text "metadata", :
|
951
|
+
t.text "metadata", default: "{}"
|
932
952
|
t.integer "sort_key"
|
933
953
|
t.integer "user_import_file_id"
|
934
|
-
t.datetime "created_at"
|
935
|
-
t.datetime "updated_at"
|
954
|
+
t.datetime "created_at"
|
955
|
+
t.datetime "updated_at"
|
936
956
|
end
|
937
957
|
|
938
|
-
add_index "user_import_file_transitions", ["sort_key", "user_import_file_id"], :
|
939
|
-
add_index "user_import_file_transitions", ["user_import_file_id"], :
|
958
|
+
add_index "user_import_file_transitions", ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
|
959
|
+
add_index "user_import_file_transitions", ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
|
940
960
|
|
941
|
-
create_table "user_import_files", :
|
961
|
+
create_table "user_import_files", force: true do |t|
|
942
962
|
t.integer "user_id"
|
943
963
|
t.text "note"
|
944
964
|
t.datetime "executed_at"
|
@@ -949,57 +969,57 @@ ActiveRecord::Schema.define(:version => 20140817155043) do
|
|
949
969
|
t.string "user_import_fingerprint"
|
950
970
|
t.string "edit_mode"
|
951
971
|
t.text "error_message"
|
952
|
-
t.datetime "created_at"
|
953
|
-
t.datetime "updated_at"
|
972
|
+
t.datetime "created_at"
|
973
|
+
t.datetime "updated_at"
|
954
974
|
t.string "user_encoding"
|
955
975
|
t.integer "default_library_id"
|
956
976
|
t.integer "default_user_group_id"
|
957
977
|
end
|
958
978
|
|
959
|
-
create_table "user_import_results", :
|
979
|
+
create_table "user_import_results", force: true do |t|
|
960
980
|
t.integer "user_import_file_id"
|
961
981
|
t.integer "user_id"
|
962
982
|
t.text "body"
|
963
|
-
t.datetime "created_at"
|
964
|
-
t.datetime "updated_at"
|
983
|
+
t.datetime "created_at"
|
984
|
+
t.datetime "updated_at"
|
965
985
|
end
|
966
986
|
|
967
|
-
create_table "users", :
|
968
|
-
t.string "email", :
|
969
|
-
t.string "encrypted_password", :
|
987
|
+
create_table "users", force: true do |t|
|
988
|
+
t.string "email", default: "", null: false
|
989
|
+
t.string "encrypted_password", default: "", null: false
|
970
990
|
t.string "reset_password_token"
|
971
991
|
t.datetime "reset_password_sent_at"
|
972
992
|
t.datetime "remember_created_at"
|
973
|
-
t.integer "sign_in_count", :
|
993
|
+
t.integer "sign_in_count", default: 0
|
974
994
|
t.datetime "current_sign_in_at"
|
975
995
|
t.datetime "last_sign_in_at"
|
976
996
|
t.string "current_sign_in_ip"
|
977
997
|
t.string "last_sign_in_ip"
|
978
|
-
t.datetime "created_at"
|
979
|
-
t.datetime "updated_at"
|
998
|
+
t.datetime "created_at"
|
999
|
+
t.datetime "updated_at"
|
980
1000
|
t.string "username"
|
981
1001
|
t.datetime "deleted_at"
|
982
1002
|
t.datetime "expired_at"
|
983
|
-
t.integer "failed_attempts", :
|
1003
|
+
t.integer "failed_attempts", default: 0
|
984
1004
|
t.string "unlock_token"
|
985
1005
|
t.datetime "locked_at"
|
986
1006
|
t.datetime "confirmed_at"
|
987
1007
|
end
|
988
1008
|
|
989
|
-
add_index "users", ["email"], :
|
990
|
-
add_index "users", ["reset_password_token"], :
|
991
|
-
add_index "users", ["unlock_token"], :
|
992
|
-
add_index "users", ["username"], :
|
1009
|
+
add_index "users", ["email"], name: "index_users_on_email"
|
1010
|
+
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
1011
|
+
add_index "users", ["unlock_token"], name: "index_users_on_unlock_token", unique: true
|
1012
|
+
add_index "users", ["username"], name: "index_users_on_username", unique: true
|
993
1013
|
|
994
|
-
create_table "versions", :
|
995
|
-
t.string "item_type", :
|
996
|
-
t.integer "item_id", :
|
997
|
-
t.string "event", :
|
1014
|
+
create_table "versions", force: true do |t|
|
1015
|
+
t.string "item_type", null: false
|
1016
|
+
t.integer "item_id", null: false
|
1017
|
+
t.string "event", null: false
|
998
1018
|
t.string "whodunnit"
|
999
1019
|
t.text "object"
|
1000
1020
|
t.datetime "created_at"
|
1001
1021
|
end
|
1002
1022
|
|
1003
|
-
add_index "versions", ["item_type", "item_id"], :
|
1023
|
+
add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
|
1004
1024
|
|
1005
1025
|
end
|