enju_biblio 0.1.0.pre61 → 0.1.0.pre62
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/items/show.mobile.erb +9 -10
- data/lib/enju_biblio/version.rb +1 -1
- data/spec/dummy/db/migrate/20140524135607_create_bookmark_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140812093836_add_share_bookmarks_to_profile.rb +5 -0
- data/spec/dummy/db/schema.rb +686 -691
- metadata +10 -8
- data/spec/dummy/db/migrate/20111231145823_add_share_bookmarks_to_user.rb +0 -5
data/spec/dummy/db/schema.rb
CHANGED
@@ -9,23 +9,23 @@
|
|
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: 20140823095740) do
|
15
15
|
|
16
|
-
create_table "agent_import_file_transitions", :
|
16
|
+
create_table "agent_import_file_transitions", force: true do |t|
|
17
17
|
t.string "to_state"
|
18
|
-
t.text "metadata", :
|
18
|
+
t.text "metadata", default: "{}"
|
19
19
|
t.integer "sort_key"
|
20
20
|
t.integer "agent_import_file_id"
|
21
|
-
t.datetime "created_at"
|
22
|
-
t.datetime "updated_at"
|
21
|
+
t.datetime "created_at"
|
22
|
+
t.datetime "updated_at"
|
23
23
|
end
|
24
24
|
|
25
|
-
add_index "agent_import_file_transitions", ["agent_import_file_id"], :
|
26
|
-
add_index "agent_import_file_transitions", ["sort_key", "agent_import_file_id"], :
|
25
|
+
add_index "agent_import_file_transitions", ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
|
26
|
+
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
|
27
27
|
|
28
|
-
create_table "agent_import_files", :
|
28
|
+
create_table "agent_import_files", force: true do |t|
|
29
29
|
t.integer "parent_id"
|
30
30
|
t.string "content_type"
|
31
31
|
t.integer "size"
|
@@ -36,72 +36,72 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
36
36
|
t.string "agent_import_content_type"
|
37
37
|
t.integer "agent_import_file_size"
|
38
38
|
t.datetime "agent_import_updated_at"
|
39
|
-
t.datetime "created_at"
|
40
|
-
t.datetime "updated_at"
|
39
|
+
t.datetime "created_at"
|
40
|
+
t.datetime "updated_at"
|
41
41
|
t.string "agent_import_fingerprint"
|
42
42
|
t.text "error_message"
|
43
43
|
t.string "edit_mode"
|
44
44
|
t.string "user_encoding"
|
45
45
|
end
|
46
46
|
|
47
|
-
add_index "agent_import_files", ["parent_id"], :
|
48
|
-
add_index "agent_import_files", ["user_id"], :
|
47
|
+
add_index "agent_import_files", ["parent_id"], name: "index_agent_import_files_on_parent_id"
|
48
|
+
add_index "agent_import_files", ["user_id"], name: "index_agent_import_files_on_user_id"
|
49
49
|
|
50
|
-
create_table "agent_import_results", :
|
50
|
+
create_table "agent_import_results", force: true do |t|
|
51
51
|
t.integer "agent_import_file_id"
|
52
52
|
t.integer "agent_id"
|
53
53
|
t.text "body"
|
54
|
-
t.datetime "created_at"
|
55
|
-
t.datetime "updated_at"
|
54
|
+
t.datetime "created_at"
|
55
|
+
t.datetime "updated_at"
|
56
56
|
end
|
57
57
|
|
58
|
-
create_table "agent_merge_lists", :
|
58
|
+
create_table "agent_merge_lists", force: true do |t|
|
59
59
|
t.string "title"
|
60
|
-
t.datetime "created_at"
|
61
|
-
t.datetime "updated_at"
|
60
|
+
t.datetime "created_at"
|
61
|
+
t.datetime "updated_at"
|
62
62
|
end
|
63
63
|
|
64
|
-
create_table "agent_merges", :
|
65
|
-
t.integer "agent_id", :
|
66
|
-
t.integer "agent_merge_list_id", :
|
67
|
-
t.datetime "created_at"
|
68
|
-
t.datetime "updated_at"
|
64
|
+
create_table "agent_merges", force: true do |t|
|
65
|
+
t.integer "agent_id", null: false
|
66
|
+
t.integer "agent_merge_list_id", null: false
|
67
|
+
t.datetime "created_at"
|
68
|
+
t.datetime "updated_at"
|
69
69
|
end
|
70
70
|
|
71
|
-
add_index "agent_merges", ["agent_id"], :
|
72
|
-
add_index "agent_merges", ["agent_merge_list_id"], :
|
71
|
+
add_index "agent_merges", ["agent_id"], name: "index_agent_merges_on_agent_id"
|
72
|
+
add_index "agent_merges", ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id"
|
73
73
|
|
74
|
-
create_table "agent_relationship_types", :
|
75
|
-
t.string "name", :
|
74
|
+
create_table "agent_relationship_types", force: true do |t|
|
75
|
+
t.string "name", null: false
|
76
76
|
t.text "display_name"
|
77
77
|
t.text "note"
|
78
78
|
t.integer "position"
|
79
|
-
t.datetime "created_at"
|
80
|
-
t.datetime "updated_at"
|
79
|
+
t.datetime "created_at"
|
80
|
+
t.datetime "updated_at"
|
81
81
|
end
|
82
82
|
|
83
|
-
create_table "agent_relationships", :
|
83
|
+
create_table "agent_relationships", force: true do |t|
|
84
84
|
t.integer "parent_id"
|
85
85
|
t.integer "child_id"
|
86
86
|
t.integer "agent_relationship_type_id"
|
87
|
-
t.datetime "created_at"
|
88
|
-
t.datetime "updated_at"
|
87
|
+
t.datetime "created_at"
|
88
|
+
t.datetime "updated_at"
|
89
89
|
t.integer "position"
|
90
90
|
end
|
91
91
|
|
92
|
-
add_index "agent_relationships", ["child_id"], :
|
93
|
-
add_index "agent_relationships", ["parent_id"], :
|
92
|
+
add_index "agent_relationships", ["child_id"], name: "index_agent_relationships_on_child_id"
|
93
|
+
add_index "agent_relationships", ["parent_id"], name: "index_agent_relationships_on_parent_id"
|
94
94
|
|
95
|
-
create_table "agent_types", :
|
96
|
-
t.string "name", :
|
95
|
+
create_table "agent_types", force: true do |t|
|
96
|
+
t.string "name", null: false
|
97
97
|
t.text "display_name"
|
98
98
|
t.text "note"
|
99
99
|
t.integer "position"
|
100
|
-
t.datetime "created_at"
|
101
|
-
t.datetime "updated_at"
|
100
|
+
t.datetime "created_at"
|
101
|
+
t.datetime "updated_at"
|
102
102
|
end
|
103
103
|
|
104
|
-
create_table "agents", :
|
104
|
+
create_table "agents", force: true do |t|
|
105
105
|
t.string "last_name"
|
106
106
|
t.string "middle_name"
|
107
107
|
t.string "first_name"
|
@@ -113,8 +113,8 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
113
113
|
t.string "full_name"
|
114
114
|
t.text "full_name_transcription"
|
115
115
|
t.text "full_name_alternative"
|
116
|
-
t.datetime "created_at"
|
117
|
-
t.datetime "updated_at"
|
116
|
+
t.datetime "created_at"
|
117
|
+
t.datetime "updated_at"
|
118
118
|
t.datetime "deleted_at"
|
119
119
|
t.string "zip_code_1"
|
120
120
|
t.string "zip_code_2"
|
@@ -134,13 +134,13 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
134
134
|
t.text "region"
|
135
135
|
t.datetime "date_of_birth"
|
136
136
|
t.datetime "date_of_death"
|
137
|
-
t.integer "language_id", :
|
138
|
-
t.integer "country_id", :
|
139
|
-
t.integer "agent_type_id", :
|
140
|
-
t.integer "lock_version", :
|
137
|
+
t.integer "language_id", default: 1, null: false
|
138
|
+
t.integer "country_id", default: 1, null: false
|
139
|
+
t.integer "agent_type_id", default: 1, null: false
|
140
|
+
t.integer "lock_version", default: 0, null: false
|
141
141
|
t.text "note"
|
142
|
-
t.integer "required_role_id", :
|
143
|
-
t.integer "required_score", :
|
142
|
+
t.integer "required_role_id", default: 1, null: false
|
143
|
+
t.integer "required_score", default: 0, null: false
|
144
144
|
t.text "email"
|
145
145
|
t.text "url"
|
146
146
|
t.text "full_name_alternative_transcription"
|
@@ -149,60 +149,72 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
149
149
|
t.string "agent_identifier"
|
150
150
|
end
|
151
151
|
|
152
|
-
add_index "agents", ["agent_identifier"], :
|
153
|
-
add_index "agents", ["country_id"], :
|
154
|
-
add_index "agents", ["full_name"], :
|
155
|
-
add_index "agents", ["language_id"], :
|
156
|
-
add_index "agents", ["required_role_id"], :
|
152
|
+
add_index "agents", ["agent_identifier"], name: "index_agents_on_agent_identifier"
|
153
|
+
add_index "agents", ["country_id"], name: "index_agents_on_country_id"
|
154
|
+
add_index "agents", ["full_name"], name: "index_agents_on_full_name"
|
155
|
+
add_index "agents", ["language_id"], name: "index_agents_on_language_id"
|
156
|
+
add_index "agents", ["required_role_id"], name: "index_agents_on_required_role_id"
|
157
157
|
|
158
|
-
create_table "baskets", :
|
158
|
+
create_table "baskets", force: true do |t|
|
159
159
|
t.integer "user_id"
|
160
160
|
t.text "note"
|
161
|
-
t.integer "lock_version", :
|
162
|
-
t.datetime "created_at"
|
163
|
-
t.datetime "updated_at"
|
161
|
+
t.integer "lock_version", default: 0, null: false
|
162
|
+
t.datetime "created_at"
|
163
|
+
t.datetime "updated_at"
|
164
164
|
end
|
165
165
|
|
166
|
-
add_index "baskets", ["user_id"], :
|
166
|
+
add_index "baskets", ["user_id"], name: "index_baskets_on_user_id"
|
167
167
|
|
168
|
-
create_table "bookmark_stat_has_manifestations", :
|
169
|
-
t.integer "bookmark_stat_id", :
|
170
|
-
t.integer "manifestation_id", :
|
168
|
+
create_table "bookmark_stat_has_manifestations", force: true do |t|
|
169
|
+
t.integer "bookmark_stat_id", null: false
|
170
|
+
t.integer "manifestation_id", null: false
|
171
171
|
t.integer "bookmarks_count"
|
172
|
-
t.datetime "created_at"
|
173
|
-
t.datetime "updated_at"
|
172
|
+
t.datetime "created_at"
|
173
|
+
t.datetime "updated_at"
|
174
|
+
end
|
175
|
+
|
176
|
+
add_index "bookmark_stat_has_manifestations", ["bookmark_stat_id"], name: "index_bookmark_stat_has_manifestations_on_bookmark_stat_id"
|
177
|
+
add_index "bookmark_stat_has_manifestations", ["manifestation_id"], name: "index_bookmark_stat_has_manifestations_on_manifestation_id"
|
178
|
+
|
179
|
+
create_table "bookmark_stat_transitions", force: true do |t|
|
180
|
+
t.string "to_state"
|
181
|
+
t.text "metadata", default: "{}"
|
182
|
+
t.integer "sort_key"
|
183
|
+
t.integer "bookmark_stat_id"
|
184
|
+
t.datetime "created_at"
|
185
|
+
t.datetime "updated_at"
|
174
186
|
end
|
175
187
|
|
176
|
-
add_index "
|
177
|
-
add_index "
|
188
|
+
add_index "bookmark_stat_transitions", ["bookmark_stat_id"], name: "index_bookmark_stat_transitions_on_bookmark_stat_id"
|
189
|
+
add_index "bookmark_stat_transitions", ["sort_key", "bookmark_stat_id"], name: "index_bookmark_stat_transitions_on_sort_key_and_stat_id", unique: true
|
178
190
|
|
179
|
-
create_table "bookmark_stats", :
|
191
|
+
create_table "bookmark_stats", force: true do |t|
|
180
192
|
t.datetime "start_date"
|
181
193
|
t.datetime "end_date"
|
182
194
|
t.datetime "started_at"
|
183
195
|
t.datetime "completed_at"
|
184
196
|
t.text "note"
|
185
|
-
t.datetime "created_at"
|
186
|
-
t.datetime "updated_at"
|
197
|
+
t.datetime "created_at"
|
198
|
+
t.datetime "updated_at"
|
187
199
|
end
|
188
200
|
|
189
|
-
create_table "bookmarks", :
|
190
|
-
t.integer "user_id", :
|
201
|
+
create_table "bookmarks", force: true do |t|
|
202
|
+
t.integer "user_id", null: false
|
191
203
|
t.integer "manifestation_id"
|
192
204
|
t.text "title"
|
193
205
|
t.string "url"
|
194
206
|
t.text "note"
|
195
207
|
t.boolean "shared"
|
196
|
-
t.datetime "created_at"
|
197
|
-
t.datetime "updated_at"
|
208
|
+
t.datetime "created_at"
|
209
|
+
t.datetime "updated_at"
|
198
210
|
end
|
199
211
|
|
200
|
-
add_index "bookmarks", ["manifestation_id"], :
|
201
|
-
add_index "bookmarks", ["url"], :
|
202
|
-
add_index "bookmarks", ["user_id"], :
|
212
|
+
add_index "bookmarks", ["manifestation_id"], name: "index_bookmarks_on_manifestation_id"
|
213
|
+
add_index "bookmarks", ["url"], name: "index_bookmarks_on_url"
|
214
|
+
add_index "bookmarks", ["user_id"], name: "index_bookmarks_on_user_id"
|
203
215
|
|
204
|
-
create_table "bookstores", :
|
205
|
-
t.text "name", :
|
216
|
+
create_table "bookstores", force: true do |t|
|
217
|
+
t.text "name", null: false
|
206
218
|
t.string "zip_code"
|
207
219
|
t.text "address"
|
208
220
|
t.text "note"
|
@@ -211,174 +223,174 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
211
223
|
t.string "url"
|
212
224
|
t.integer "position"
|
213
225
|
t.datetime "deleted_at"
|
214
|
-
t.datetime "created_at"
|
215
|
-
t.datetime "updated_at"
|
226
|
+
t.datetime "created_at"
|
227
|
+
t.datetime "updated_at"
|
216
228
|
end
|
217
229
|
|
218
|
-
create_table "budget_types", :
|
230
|
+
create_table "budget_types", force: true do |t|
|
219
231
|
t.string "name"
|
220
232
|
t.text "display_name"
|
221
233
|
t.text "note"
|
222
234
|
t.integer "position"
|
223
|
-
t.datetime "created_at"
|
224
|
-
t.datetime "updated_at"
|
235
|
+
t.datetime "created_at"
|
236
|
+
t.datetime "updated_at"
|
225
237
|
end
|
226
238
|
|
227
|
-
create_table "carrier_type_has_checkout_types", :
|
228
|
-
t.integer "carrier_type_id", :
|
229
|
-
t.integer "checkout_type_id", :
|
239
|
+
create_table "carrier_type_has_checkout_types", force: true do |t|
|
240
|
+
t.integer "carrier_type_id", null: false
|
241
|
+
t.integer "checkout_type_id", null: false
|
230
242
|
t.text "note"
|
231
243
|
t.integer "position"
|
232
|
-
t.datetime "created_at"
|
233
|
-
t.datetime "updated_at"
|
244
|
+
t.datetime "created_at"
|
245
|
+
t.datetime "updated_at"
|
234
246
|
end
|
235
247
|
|
236
|
-
add_index "carrier_type_has_checkout_types", ["carrier_type_id"], :
|
237
|
-
add_index "carrier_type_has_checkout_types", ["checkout_type_id"], :
|
248
|
+
add_index "carrier_type_has_checkout_types", ["carrier_type_id"], name: "index_carrier_type_has_checkout_types_on_m_form_id"
|
249
|
+
add_index "carrier_type_has_checkout_types", ["checkout_type_id"], name: "index_carrier_type_has_checkout_types_on_checkout_type_id"
|
238
250
|
|
239
|
-
create_table "carrier_types", :
|
240
|
-
t.string "name", :
|
251
|
+
create_table "carrier_types", force: true do |t|
|
252
|
+
t.string "name", null: false
|
241
253
|
t.text "display_name"
|
242
254
|
t.text "note"
|
243
255
|
t.integer "position"
|
244
|
-
t.datetime "created_at"
|
245
|
-
t.datetime "updated_at"
|
256
|
+
t.datetime "created_at"
|
257
|
+
t.datetime "updated_at"
|
246
258
|
end
|
247
259
|
|
248
|
-
create_table "checked_items", :
|
249
|
-
t.integer "item_id", :
|
250
|
-
t.integer "basket_id", :
|
251
|
-
t.datetime "due_date", :
|
252
|
-
t.datetime "created_at"
|
253
|
-
t.datetime "updated_at"
|
260
|
+
create_table "checked_items", force: true do |t|
|
261
|
+
t.integer "item_id", null: false
|
262
|
+
t.integer "basket_id", null: false
|
263
|
+
t.datetime "due_date", null: false
|
264
|
+
t.datetime "created_at"
|
265
|
+
t.datetime "updated_at"
|
254
266
|
t.integer "librarian_id"
|
255
267
|
end
|
256
268
|
|
257
|
-
add_index "checked_items", ["basket_id"], :
|
258
|
-
add_index "checked_items", ["item_id"], :
|
269
|
+
add_index "checked_items", ["basket_id"], name: "index_checked_items_on_basket_id"
|
270
|
+
add_index "checked_items", ["item_id"], name: "index_checked_items_on_item_id"
|
259
271
|
|
260
|
-
create_table "checkins", :
|
261
|
-
t.integer "item_id", :
|
272
|
+
create_table "checkins", force: true do |t|
|
273
|
+
t.integer "item_id", null: false
|
262
274
|
t.integer "librarian_id"
|
263
275
|
t.integer "basket_id"
|
264
|
-
t.datetime "created_at"
|
265
|
-
t.datetime "updated_at"
|
276
|
+
t.datetime "created_at"
|
277
|
+
t.datetime "updated_at"
|
266
278
|
end
|
267
279
|
|
268
|
-
add_index "checkins", ["basket_id"], :
|
269
|
-
add_index "checkins", ["item_id"], :
|
270
|
-
add_index "checkins", ["librarian_id"], :
|
280
|
+
add_index "checkins", ["basket_id"], name: "index_checkins_on_basket_id"
|
281
|
+
add_index "checkins", ["item_id"], name: "index_checkins_on_item_id"
|
282
|
+
add_index "checkins", ["librarian_id"], name: "index_checkins_on_librarian_id"
|
271
283
|
|
272
|
-
create_table "checkout_stat_has_manifestations", :
|
273
|
-
t.integer "manifestation_checkout_stat_id", :
|
274
|
-
t.integer "manifestation_id", :
|
284
|
+
create_table "checkout_stat_has_manifestations", force: true do |t|
|
285
|
+
t.integer "manifestation_checkout_stat_id", null: false
|
286
|
+
t.integer "manifestation_id", null: false
|
275
287
|
t.integer "checkouts_count"
|
276
|
-
t.datetime "created_at"
|
277
|
-
t.datetime "updated_at"
|
288
|
+
t.datetime "created_at"
|
289
|
+
t.datetime "updated_at"
|
278
290
|
end
|
279
291
|
|
280
|
-
add_index "checkout_stat_has_manifestations", ["manifestation_checkout_stat_id"], :
|
281
|
-
add_index "checkout_stat_has_manifestations", ["manifestation_id"], :
|
292
|
+
add_index "checkout_stat_has_manifestations", ["manifestation_checkout_stat_id"], name: "index_checkout_stat_has_manifestations_on_checkout_stat_id"
|
293
|
+
add_index "checkout_stat_has_manifestations", ["manifestation_id"], name: "index_checkout_stat_has_manifestations_on_manifestation_id"
|
282
294
|
|
283
|
-
create_table "checkout_stat_has_users", :
|
284
|
-
t.integer "user_checkout_stat_id",
|
285
|
-
t.integer "user_id",
|
286
|
-
t.integer "checkouts_count", :
|
287
|
-
t.datetime "created_at"
|
288
|
-
t.datetime "updated_at"
|
295
|
+
create_table "checkout_stat_has_users", force: true do |t|
|
296
|
+
t.integer "user_checkout_stat_id", null: false
|
297
|
+
t.integer "user_id", null: false
|
298
|
+
t.integer "checkouts_count", default: 0, null: false
|
299
|
+
t.datetime "created_at"
|
300
|
+
t.datetime "updated_at"
|
289
301
|
end
|
290
302
|
|
291
|
-
add_index "checkout_stat_has_users", ["user_checkout_stat_id"], :
|
292
|
-
add_index "checkout_stat_has_users", ["user_id"], :
|
303
|
+
add_index "checkout_stat_has_users", ["user_checkout_stat_id"], name: "index_checkout_stat_has_users_on_user_checkout_stat_id"
|
304
|
+
add_index "checkout_stat_has_users", ["user_id"], name: "index_checkout_stat_has_users_on_user_id"
|
293
305
|
|
294
|
-
create_table "checkout_types", :
|
295
|
-
t.string "name", :
|
306
|
+
create_table "checkout_types", force: true do |t|
|
307
|
+
t.string "name", null: false
|
296
308
|
t.text "display_name"
|
297
309
|
t.text "note"
|
298
310
|
t.integer "position"
|
299
|
-
t.datetime "created_at"
|
300
|
-
t.datetime "updated_at"
|
311
|
+
t.datetime "created_at"
|
312
|
+
t.datetime "updated_at"
|
301
313
|
end
|
302
314
|
|
303
|
-
add_index "checkout_types", ["name"], :
|
315
|
+
add_index "checkout_types", ["name"], name: "index_checkout_types_on_name"
|
304
316
|
|
305
|
-
create_table "checkouts", :
|
317
|
+
create_table "checkouts", force: true do |t|
|
306
318
|
t.integer "user_id"
|
307
|
-
t.integer "item_id",
|
319
|
+
t.integer "item_id", null: false
|
308
320
|
t.integer "checkin_id"
|
309
321
|
t.integer "librarian_id"
|
310
322
|
t.integer "basket_id"
|
311
323
|
t.datetime "due_date"
|
312
|
-
t.integer "checkout_renewal_count", :
|
313
|
-
t.integer "lock_version", :
|
314
|
-
t.datetime "created_at"
|
315
|
-
t.datetime "updated_at"
|
324
|
+
t.integer "checkout_renewal_count", default: 0, null: false
|
325
|
+
t.integer "lock_version", default: 0, null: false
|
326
|
+
t.datetime "created_at"
|
327
|
+
t.datetime "updated_at"
|
316
328
|
end
|
317
329
|
|
318
|
-
add_index "checkouts", ["basket_id"], :
|
319
|
-
add_index "checkouts", ["checkin_id"], :
|
320
|
-
add_index "checkouts", ["item_id", "basket_id"], :
|
321
|
-
add_index "checkouts", ["item_id"], :
|
322
|
-
add_index "checkouts", ["librarian_id"], :
|
323
|
-
add_index "checkouts", ["user_id"], :
|
330
|
+
add_index "checkouts", ["basket_id"], name: "index_checkouts_on_basket_id"
|
331
|
+
add_index "checkouts", ["checkin_id"], name: "index_checkouts_on_checkin_id"
|
332
|
+
add_index "checkouts", ["item_id", "basket_id"], name: "index_checkouts_on_item_id_and_basket_id", unique: true
|
333
|
+
add_index "checkouts", ["item_id"], name: "index_checkouts_on_item_id"
|
334
|
+
add_index "checkouts", ["librarian_id"], name: "index_checkouts_on_librarian_id"
|
335
|
+
add_index "checkouts", ["user_id"], name: "index_checkouts_on_user_id"
|
324
336
|
|
325
|
-
create_table "circulation_statuses", :
|
326
|
-
t.string "name", :
|
337
|
+
create_table "circulation_statuses", force: true do |t|
|
338
|
+
t.string "name", null: false
|
327
339
|
t.text "display_name"
|
328
340
|
t.text "note"
|
329
341
|
t.integer "position"
|
330
|
-
t.datetime "created_at"
|
331
|
-
t.datetime "updated_at"
|
342
|
+
t.datetime "created_at"
|
343
|
+
t.datetime "updated_at"
|
332
344
|
end
|
333
345
|
|
334
|
-
create_table "classification_types", :
|
335
|
-
t.string "name", :
|
346
|
+
create_table "classification_types", force: true do |t|
|
347
|
+
t.string "name", null: false
|
336
348
|
t.text "display_name"
|
337
349
|
t.text "note"
|
338
350
|
t.integer "position"
|
339
|
-
t.datetime "created_at"
|
340
|
-
t.datetime "updated_at"
|
351
|
+
t.datetime "created_at"
|
352
|
+
t.datetime "updated_at"
|
341
353
|
end
|
342
354
|
|
343
|
-
create_table "classifications", :
|
355
|
+
create_table "classifications", force: true do |t|
|
344
356
|
t.integer "parent_id"
|
345
|
-
t.string "category", :
|
357
|
+
t.string "category", null: false
|
346
358
|
t.text "note"
|
347
|
-
t.integer "classification_type_id", :
|
348
|
-
t.datetime "created_at"
|
349
|
-
t.datetime "updated_at"
|
359
|
+
t.integer "classification_type_id", null: false
|
360
|
+
t.datetime "created_at"
|
361
|
+
t.datetime "updated_at"
|
350
362
|
t.integer "lft"
|
351
363
|
t.integer "rgt"
|
352
364
|
t.integer "manifestation_id"
|
353
365
|
end
|
354
366
|
|
355
|
-
add_index "classifications", ["category"], :
|
356
|
-
add_index "classifications", ["classification_type_id"], :
|
357
|
-
add_index "classifications", ["manifestation_id"], :
|
358
|
-
add_index "classifications", ["parent_id"], :
|
367
|
+
add_index "classifications", ["category"], name: "index_classifications_on_category"
|
368
|
+
add_index "classifications", ["classification_type_id"], name: "index_classifications_on_classification_type_id"
|
369
|
+
add_index "classifications", ["manifestation_id"], name: "index_classifications_on_manifestation_id"
|
370
|
+
add_index "classifications", ["parent_id"], name: "index_classifications_on_parent_id"
|
359
371
|
|
360
|
-
create_table "colors", :
|
372
|
+
create_table "colors", force: true do |t|
|
361
373
|
t.integer "library_group_id"
|
362
374
|
t.string "property"
|
363
375
|
t.string "code"
|
364
376
|
t.integer "position"
|
365
|
-
t.datetime "created_at"
|
366
|
-
t.datetime "updated_at"
|
377
|
+
t.datetime "created_at"
|
378
|
+
t.datetime "updated_at"
|
367
379
|
end
|
368
380
|
|
369
|
-
add_index "colors", ["library_group_id"], :
|
381
|
+
add_index "colors", ["library_group_id"], name: "index_colors_on_library_group_id"
|
370
382
|
|
371
|
-
create_table "content_types", :
|
372
|
-
t.string "name", :
|
383
|
+
create_table "content_types", force: true do |t|
|
384
|
+
t.string "name", null: false
|
373
385
|
t.text "display_name"
|
374
386
|
t.text "note"
|
375
387
|
t.integer "position"
|
376
|
-
t.datetime "created_at"
|
377
|
-
t.datetime "updated_at"
|
388
|
+
t.datetime "created_at"
|
389
|
+
t.datetime "updated_at"
|
378
390
|
end
|
379
391
|
|
380
|
-
create_table "countries", :
|
381
|
-
t.string "name", :
|
392
|
+
create_table "countries", force: true do |t|
|
393
|
+
t.string "name", null: false
|
382
394
|
t.text "display_name"
|
383
395
|
t.string "alpha_2"
|
384
396
|
t.string "alpha_3"
|
@@ -387,68 +399,52 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
387
399
|
t.integer "position"
|
388
400
|
end
|
389
401
|
|
390
|
-
add_index "countries", ["alpha_2"], :
|
391
|
-
add_index "countries", ["alpha_3"], :
|
392
|
-
add_index "countries", ["name"], :
|
393
|
-
add_index "countries", ["numeric_3"], :
|
402
|
+
add_index "countries", ["alpha_2"], name: "index_countries_on_alpha_2"
|
403
|
+
add_index "countries", ["alpha_3"], name: "index_countries_on_alpha_3"
|
404
|
+
add_index "countries", ["name"], name: "index_countries_on_name"
|
405
|
+
add_index "countries", ["numeric_3"], name: "index_countries_on_numeric_3"
|
394
406
|
|
395
|
-
create_table "create_types", :
|
407
|
+
create_table "create_types", force: true do |t|
|
396
408
|
t.string "name"
|
397
409
|
t.text "display_name"
|
398
410
|
t.text "note"
|
399
411
|
t.integer "position"
|
400
|
-
t.datetime "created_at"
|
401
|
-
t.datetime "updated_at"
|
412
|
+
t.datetime "created_at"
|
413
|
+
t.datetime "updated_at"
|
402
414
|
end
|
403
415
|
|
404
|
-
create_table "creates", :
|
405
|
-
t.integer "agent_id", :
|
406
|
-
t.integer "work_id", :
|
416
|
+
create_table "creates", force: true do |t|
|
417
|
+
t.integer "agent_id", null: false
|
418
|
+
t.integer "work_id", null: false
|
407
419
|
t.integer "position"
|
408
|
-
t.datetime "created_at"
|
409
|
-
t.datetime "updated_at"
|
420
|
+
t.datetime "created_at"
|
421
|
+
t.datetime "updated_at"
|
410
422
|
t.integer "create_type_id"
|
411
423
|
end
|
412
424
|
|
413
|
-
add_index "creates", ["agent_id"], :
|
414
|
-
add_index "creates", ["work_id"], :
|
415
|
-
|
416
|
-
create_table "delayed_jobs", :force => true do |t|
|
417
|
-
t.integer "priority", :default => 0
|
418
|
-
t.integer "attempts", :default => 0
|
419
|
-
t.text "handler"
|
420
|
-
t.text "last_error"
|
421
|
-
t.datetime "run_at"
|
422
|
-
t.datetime "locked_at"
|
423
|
-
t.datetime "failed_at"
|
424
|
-
t.string "locked_by"
|
425
|
-
t.datetime "created_at", :null => false
|
426
|
-
t.datetime "updated_at", :null => false
|
427
|
-
t.string "queue"
|
428
|
-
end
|
425
|
+
add_index "creates", ["agent_id"], name: "index_creates_on_agent_id"
|
426
|
+
add_index "creates", ["work_id"], name: "index_creates_on_work_id"
|
429
427
|
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
t.
|
434
|
-
t.
|
435
|
-
t.datetime "created_at", :null => false
|
436
|
-
t.datetime "updated_at", :null => false
|
428
|
+
create_table "donates", force: true do |t|
|
429
|
+
t.integer "agent_id", null: false
|
430
|
+
t.integer "item_id", null: false
|
431
|
+
t.datetime "created_at"
|
432
|
+
t.datetime "updated_at"
|
437
433
|
end
|
438
434
|
|
439
|
-
add_index "donates", ["agent_id"], :
|
440
|
-
add_index "donates", ["item_id"], :
|
435
|
+
add_index "donates", ["agent_id"], name: "index_donates_on_agent_id"
|
436
|
+
add_index "donates", ["item_id"], name: "index_donates_on_item_id"
|
441
437
|
|
442
|
-
create_table "event_categories", :
|
443
|
-
t.string "name", :
|
438
|
+
create_table "event_categories", force: true do |t|
|
439
|
+
t.string "name", null: false
|
444
440
|
t.text "display_name"
|
445
441
|
t.text "note"
|
446
442
|
t.integer "position"
|
447
|
-
t.datetime "created_at"
|
448
|
-
t.datetime "updated_at"
|
443
|
+
t.datetime "created_at"
|
444
|
+
t.datetime "updated_at"
|
449
445
|
end
|
450
446
|
|
451
|
-
create_table "event_import_files", :
|
447
|
+
create_table "event_import_files", force: true do |t|
|
452
448
|
t.integer "parent_id"
|
453
449
|
t.string "content_type"
|
454
450
|
t.integer "size"
|
@@ -460,134 +456,134 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
460
456
|
t.integer "event_import_file_size"
|
461
457
|
t.datetime "event_import_updated_at"
|
462
458
|
t.string "edit_mode"
|
463
|
-
t.datetime "created_at"
|
464
|
-
t.datetime "updated_at"
|
459
|
+
t.datetime "created_at"
|
460
|
+
t.datetime "updated_at"
|
465
461
|
t.string "event_import_fingerprint"
|
466
462
|
t.text "error_message"
|
467
463
|
end
|
468
464
|
|
469
|
-
add_index "event_import_files", ["parent_id"], :
|
470
|
-
add_index "event_import_files", ["user_id"], :
|
465
|
+
add_index "event_import_files", ["parent_id"], name: "index_event_import_files_on_parent_id"
|
466
|
+
add_index "event_import_files", ["user_id"], name: "index_event_import_files_on_user_id"
|
471
467
|
|
472
|
-
create_table "event_import_results", :
|
468
|
+
create_table "event_import_results", force: true do |t|
|
473
469
|
t.integer "event_import_file_id"
|
474
470
|
t.integer "event_id"
|
475
471
|
t.text "body"
|
476
|
-
t.datetime "created_at"
|
477
|
-
t.datetime "updated_at"
|
472
|
+
t.datetime "created_at"
|
473
|
+
t.datetime "updated_at"
|
478
474
|
end
|
479
475
|
|
480
|
-
create_table "events", :
|
481
|
-
t.integer "library_id", :
|
482
|
-
t.integer "event_category_id", :
|
476
|
+
create_table "events", force: true do |t|
|
477
|
+
t.integer "library_id", default: 1, null: false
|
478
|
+
t.integer "event_category_id", default: 1, null: false
|
483
479
|
t.string "name"
|
484
480
|
t.text "note"
|
485
481
|
t.datetime "start_at"
|
486
482
|
t.datetime "end_at"
|
487
|
-
t.boolean "all_day", :
|
483
|
+
t.boolean "all_day", default: false, null: false
|
488
484
|
t.datetime "deleted_at"
|
489
485
|
t.text "display_name"
|
490
|
-
t.datetime "created_at"
|
491
|
-
t.datetime "updated_at"
|
486
|
+
t.datetime "created_at"
|
487
|
+
t.datetime "updated_at"
|
492
488
|
end
|
493
489
|
|
494
|
-
add_index "events", ["event_category_id"], :
|
495
|
-
add_index "events", ["library_id"], :
|
490
|
+
add_index "events", ["event_category_id"], name: "index_events_on_event_category_id"
|
491
|
+
add_index "events", ["library_id"], name: "index_events_on_library_id"
|
496
492
|
|
497
|
-
create_table "exemplifies", :
|
498
|
-
t.integer "manifestation_id", :
|
499
|
-
t.integer "item_id", :
|
493
|
+
create_table "exemplifies", force: true do |t|
|
494
|
+
t.integer "manifestation_id", null: false
|
495
|
+
t.integer "item_id", null: false
|
500
496
|
t.integer "position"
|
501
|
-
t.datetime "created_at"
|
502
|
-
t.datetime "updated_at"
|
497
|
+
t.datetime "created_at"
|
498
|
+
t.datetime "updated_at"
|
503
499
|
end
|
504
500
|
|
505
|
-
add_index "exemplifies", ["item_id"], :
|
506
|
-
add_index "exemplifies", ["manifestation_id"], :
|
501
|
+
add_index "exemplifies", ["item_id"], name: "index_exemplifies_on_item_id", unique: true
|
502
|
+
add_index "exemplifies", ["manifestation_id"], name: "index_exemplifies_on_manifestation_id"
|
507
503
|
|
508
|
-
create_table "form_of_works", :
|
509
|
-
t.string "name", :
|
504
|
+
create_table "form_of_works", force: true do |t|
|
505
|
+
t.string "name", null: false
|
510
506
|
t.text "display_name"
|
511
507
|
t.text "note"
|
512
508
|
t.integer "position"
|
513
|
-
t.datetime "created_at"
|
514
|
-
t.datetime "updated_at"
|
509
|
+
t.datetime "created_at"
|
510
|
+
t.datetime "updated_at"
|
515
511
|
end
|
516
512
|
|
517
|
-
create_table "frequencies", :
|
518
|
-
t.string "name", :
|
513
|
+
create_table "frequencies", force: true do |t|
|
514
|
+
t.string "name", null: false
|
519
515
|
t.text "display_name"
|
520
516
|
t.text "note"
|
521
517
|
t.integer "position"
|
522
|
-
t.datetime "created_at"
|
523
|
-
t.datetime "updated_at"
|
518
|
+
t.datetime "created_at"
|
519
|
+
t.datetime "updated_at"
|
524
520
|
end
|
525
521
|
|
526
|
-
create_table "identifier_types", :
|
522
|
+
create_table "identifier_types", force: true do |t|
|
527
523
|
t.string "name"
|
528
524
|
t.text "display_name"
|
529
525
|
t.text "note"
|
530
526
|
t.integer "position"
|
531
|
-
t.datetime "created_at"
|
532
|
-
t.datetime "updated_at"
|
527
|
+
t.datetime "created_at"
|
528
|
+
t.datetime "updated_at"
|
533
529
|
end
|
534
530
|
|
535
|
-
create_table "identifiers", :
|
536
|
-
t.string "body", :
|
537
|
-
t.integer "identifier_type_id", :
|
531
|
+
create_table "identifiers", force: true do |t|
|
532
|
+
t.string "body", null: false
|
533
|
+
t.integer "identifier_type_id", null: false
|
538
534
|
t.integer "manifestation_id"
|
539
535
|
t.boolean "primary"
|
540
536
|
t.integer "position"
|
541
|
-
t.datetime "created_at"
|
542
|
-
t.datetime "updated_at"
|
537
|
+
t.datetime "created_at"
|
538
|
+
t.datetime "updated_at"
|
543
539
|
end
|
544
540
|
|
545
|
-
add_index "identifiers", ["body", "identifier_type_id"], :
|
546
|
-
add_index "identifiers", ["manifestation_id"], :
|
541
|
+
add_index "identifiers", ["body", "identifier_type_id"], name: "index_identifiers_on_body_and_identifier_type_id"
|
542
|
+
add_index "identifiers", ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
|
547
543
|
|
548
|
-
create_table "import_request_transitions", :
|
544
|
+
create_table "import_request_transitions", force: true do |t|
|
549
545
|
t.string "to_state"
|
550
|
-
t.text "metadata", :
|
546
|
+
t.text "metadata", default: "{}"
|
551
547
|
t.integer "sort_key"
|
552
548
|
t.integer "import_request_id"
|
553
|
-
t.datetime "created_at"
|
554
|
-
t.datetime "updated_at"
|
549
|
+
t.datetime "created_at"
|
550
|
+
t.datetime "updated_at"
|
555
551
|
end
|
556
552
|
|
557
|
-
add_index "import_request_transitions", ["import_request_id"], :
|
558
|
-
add_index "import_request_transitions", ["sort_key", "import_request_id"], :
|
553
|
+
add_index "import_request_transitions", ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
|
554
|
+
add_index "import_request_transitions", ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
|
559
555
|
|
560
|
-
create_table "import_requests", :
|
556
|
+
create_table "import_requests", force: true do |t|
|
561
557
|
t.string "isbn"
|
562
558
|
t.integer "manifestation_id"
|
563
559
|
t.integer "user_id"
|
564
|
-
t.datetime "created_at"
|
565
|
-
t.datetime "updated_at"
|
560
|
+
t.datetime "created_at"
|
561
|
+
t.datetime "updated_at"
|
566
562
|
end
|
567
563
|
|
568
|
-
add_index "import_requests", ["isbn"], :
|
569
|
-
add_index "import_requests", ["manifestation_id"], :
|
570
|
-
add_index "import_requests", ["user_id"], :
|
564
|
+
add_index "import_requests", ["isbn"], name: "index_import_requests_on_isbn"
|
565
|
+
add_index "import_requests", ["manifestation_id"], name: "index_import_requests_on_manifestation_id"
|
566
|
+
add_index "import_requests", ["user_id"], name: "index_import_requests_on_user_id"
|
571
567
|
|
572
|
-
create_table "inventories", :
|
568
|
+
create_table "inventories", force: true do |t|
|
573
569
|
t.integer "item_id"
|
574
570
|
t.integer "inventory_file_id"
|
575
571
|
t.text "note"
|
576
|
-
t.datetime "created_at"
|
577
|
-
t.datetime "updated_at"
|
572
|
+
t.datetime "created_at"
|
573
|
+
t.datetime "updated_at"
|
578
574
|
end
|
579
575
|
|
580
|
-
add_index "inventories", ["inventory_file_id"], :
|
581
|
-
add_index "inventories", ["item_id"], :
|
576
|
+
add_index "inventories", ["inventory_file_id"], name: "index_inventories_on_inventory_file_id"
|
577
|
+
add_index "inventories", ["item_id"], name: "index_inventories_on_item_id"
|
582
578
|
|
583
|
-
create_table "inventory_files", :
|
579
|
+
create_table "inventory_files", force: true do |t|
|
584
580
|
t.string "filename"
|
585
581
|
t.string "content_type"
|
586
582
|
t.integer "size"
|
587
583
|
t.integer "user_id"
|
588
584
|
t.text "note"
|
589
|
-
t.datetime "created_at"
|
590
|
-
t.datetime "updated_at"
|
585
|
+
t.datetime "created_at"
|
586
|
+
t.datetime "updated_at"
|
591
587
|
t.string "inventory_file_name"
|
592
588
|
t.string "inventory_content_type"
|
593
589
|
t.integer "inventory_file_size"
|
@@ -595,54 +591,54 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
595
591
|
t.string "inventory_fingerprint"
|
596
592
|
end
|
597
593
|
|
598
|
-
add_index "inventory_files", ["user_id"], :
|
594
|
+
add_index "inventory_files", ["user_id"], name: "index_inventory_files_on_user_id"
|
599
595
|
|
600
|
-
create_table "item_has_use_restrictions", :
|
601
|
-
t.integer "item_id", :
|
602
|
-
t.integer "use_restriction_id", :
|
603
|
-
t.datetime "created_at"
|
604
|
-
t.datetime "updated_at"
|
596
|
+
create_table "item_has_use_restrictions", force: true do |t|
|
597
|
+
t.integer "item_id", null: false
|
598
|
+
t.integer "use_restriction_id", null: false
|
599
|
+
t.datetime "created_at"
|
600
|
+
t.datetime "updated_at"
|
605
601
|
end
|
606
602
|
|
607
|
-
add_index "item_has_use_restrictions", ["item_id"], :
|
608
|
-
add_index "item_has_use_restrictions", ["use_restriction_id"], :
|
603
|
+
add_index "item_has_use_restrictions", ["item_id"], name: "index_item_has_use_restrictions_on_item_id"
|
604
|
+
add_index "item_has_use_restrictions", ["use_restriction_id"], name: "index_item_has_use_restrictions_on_use_restriction_id"
|
609
605
|
|
610
|
-
create_table "items", :
|
606
|
+
create_table "items", force: true do |t|
|
611
607
|
t.string "call_number"
|
612
608
|
t.string "item_identifier"
|
613
|
-
t.datetime "created_at"
|
614
|
-
t.datetime "updated_at"
|
609
|
+
t.datetime "created_at"
|
610
|
+
t.datetime "updated_at"
|
615
611
|
t.datetime "deleted_at"
|
616
|
-
t.integer "shelf_id", :
|
617
|
-
t.boolean "include_supplements", :
|
612
|
+
t.integer "shelf_id", default: 1, null: false
|
613
|
+
t.boolean "include_supplements", default: false, null: false
|
618
614
|
t.text "note"
|
619
615
|
t.string "url"
|
620
616
|
t.integer "price"
|
621
|
-
t.integer "lock_version", :
|
622
|
-
t.integer "required_role_id", :
|
623
|
-
t.integer "required_score", :
|
617
|
+
t.integer "lock_version", default: 0, null: false
|
618
|
+
t.integer "required_role_id", default: 1, null: false
|
619
|
+
t.integer "required_score", default: 0, null: false
|
624
620
|
t.datetime "acquired_at"
|
625
621
|
t.integer "bookstore_id"
|
626
622
|
t.integer "budget_type_id"
|
627
|
-
t.integer "circulation_status_id", :
|
628
|
-
t.integer "checkout_type_id", :
|
623
|
+
t.integer "circulation_status_id", default: 5, null: false
|
624
|
+
t.integer "checkout_type_id", default: 1, null: false
|
629
625
|
t.string "binding_item_identifier"
|
630
626
|
t.string "binding_call_number"
|
631
627
|
t.datetime "binded_at"
|
632
628
|
t.integer "manifestation_id"
|
633
629
|
end
|
634
630
|
|
635
|
-
add_index "items", ["binding_item_identifier"], :
|
636
|
-
add_index "items", ["bookstore_id"], :
|
637
|
-
add_index "items", ["checkout_type_id"], :
|
638
|
-
add_index "items", ["circulation_status_id"], :
|
639
|
-
add_index "items", ["item_identifier"], :
|
640
|
-
add_index "items", ["manifestation_id"], :
|
641
|
-
add_index "items", ["required_role_id"], :
|
642
|
-
add_index "items", ["shelf_id"], :
|
631
|
+
add_index "items", ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
|
632
|
+
add_index "items", ["bookstore_id"], name: "index_items_on_bookstore_id"
|
633
|
+
add_index "items", ["checkout_type_id"], name: "index_items_on_checkout_type_id"
|
634
|
+
add_index "items", ["circulation_status_id"], name: "index_items_on_circulation_status_id"
|
635
|
+
add_index "items", ["item_identifier"], name: "index_items_on_item_identifier"
|
636
|
+
add_index "items", ["manifestation_id"], name: "index_items_on_manifestation_id"
|
637
|
+
add_index "items", ["required_role_id"], name: "index_items_on_required_role_id"
|
638
|
+
add_index "items", ["shelf_id"], name: "index_items_on_shelf_id"
|
643
639
|
|
644
|
-
create_table "languages", :
|
645
|
-
t.string "name", :
|
640
|
+
create_table "languages", force: true do |t|
|
641
|
+
t.string "name", null: false
|
646
642
|
t.string "native_name"
|
647
643
|
t.text "display_name"
|
648
644
|
t.string "iso_639_1"
|
@@ -652,30 +648,30 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
652
648
|
t.integer "position"
|
653
649
|
end
|
654
650
|
|
655
|
-
add_index "languages", ["iso_639_1"], :
|
656
|
-
add_index "languages", ["iso_639_2"], :
|
657
|
-
add_index "languages", ["iso_639_3"], :
|
658
|
-
add_index "languages", ["name"], :
|
651
|
+
add_index "languages", ["iso_639_1"], name: "index_languages_on_iso_639_1"
|
652
|
+
add_index "languages", ["iso_639_2"], name: "index_languages_on_iso_639_2"
|
653
|
+
add_index "languages", ["iso_639_3"], name: "index_languages_on_iso_639_3"
|
654
|
+
add_index "languages", ["name"], name: "index_languages_on_name", unique: true
|
659
655
|
|
660
|
-
create_table "lending_policies", :
|
661
|
-
t.integer "item_id",
|
662
|
-
t.integer "user_group_id",
|
663
|
-
t.integer "loan_period", :
|
656
|
+
create_table "lending_policies", force: true do |t|
|
657
|
+
t.integer "item_id", null: false
|
658
|
+
t.integer "user_group_id", null: false
|
659
|
+
t.integer "loan_period", default: 0, null: false
|
664
660
|
t.datetime "fixed_due_date"
|
665
|
-
t.integer "renewal", :
|
666
|
-
t.integer "fine", :
|
661
|
+
t.integer "renewal", default: 0, null: false
|
662
|
+
t.integer "fine", default: 0, null: false
|
667
663
|
t.text "note"
|
668
664
|
t.integer "position"
|
669
|
-
t.datetime "created_at"
|
670
|
-
t.datetime "updated_at"
|
665
|
+
t.datetime "created_at"
|
666
|
+
t.datetime "updated_at"
|
671
667
|
end
|
672
668
|
|
673
|
-
add_index "lending_policies", ["item_id", "user_group_id"], :
|
669
|
+
add_index "lending_policies", ["item_id", "user_group_id"], name: "index_lending_policies_on_item_id_and_user_group_id", unique: true
|
674
670
|
|
675
|
-
create_table "libraries", :
|
676
|
-
t.string "name",
|
671
|
+
create_table "libraries", force: true do |t|
|
672
|
+
t.string "name", null: false
|
677
673
|
t.text "display_name"
|
678
|
-
t.string "short_display_name",
|
674
|
+
t.string "short_display_name", null: false
|
679
675
|
t.string "zip_code"
|
680
676
|
t.text "street"
|
681
677
|
t.text "locality"
|
@@ -684,134 +680,134 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
684
680
|
t.string "telephone_number_2"
|
685
681
|
t.string "fax_number"
|
686
682
|
t.text "note"
|
687
|
-
t.integer "call_number_rows", :
|
688
|
-
t.string "call_number_delimiter", :
|
689
|
-
t.integer "library_group_id", :
|
690
|
-
t.integer "users_count", :
|
683
|
+
t.integer "call_number_rows", default: 1, null: false
|
684
|
+
t.string "call_number_delimiter", default: "|", null: false
|
685
|
+
t.integer "library_group_id", default: 1, null: false
|
686
|
+
t.integer "users_count", default: 0, null: false
|
691
687
|
t.integer "position"
|
692
688
|
t.integer "country_id"
|
693
|
-
t.datetime "created_at"
|
694
|
-
t.datetime "updated_at"
|
689
|
+
t.datetime "created_at"
|
690
|
+
t.datetime "updated_at"
|
695
691
|
t.datetime "deleted_at"
|
696
692
|
t.string "isil"
|
697
693
|
end
|
698
694
|
|
699
|
-
add_index "libraries", ["library_group_id"], :
|
700
|
-
add_index "libraries", ["name"], :
|
695
|
+
add_index "libraries", ["library_group_id"], name: "index_libraries_on_library_group_id"
|
696
|
+
add_index "libraries", ["name"], name: "index_libraries_on_name", unique: true
|
701
697
|
|
702
|
-
create_table "library_groups", :
|
703
|
-
t.string "name",
|
698
|
+
create_table "library_groups", force: true do |t|
|
699
|
+
t.string "name", null: false
|
704
700
|
t.text "display_name"
|
705
|
-
t.string "short_name",
|
701
|
+
t.string "short_name", null: false
|
706
702
|
t.string "email"
|
707
703
|
t.text "my_networks"
|
708
704
|
t.text "login_banner"
|
709
705
|
t.text "note"
|
710
706
|
t.integer "country_id"
|
711
707
|
t.integer "position"
|
712
|
-
t.datetime "created_at"
|
713
|
-
t.datetime "updated_at"
|
708
|
+
t.datetime "created_at"
|
709
|
+
t.datetime "updated_at"
|
714
710
|
t.text "admin_networks"
|
715
|
-
t.boolean "allow_bookmark_external_url", :
|
716
|
-
t.string "url", :
|
711
|
+
t.boolean "allow_bookmark_external_url", default: false, null: false
|
712
|
+
t.string "url", default: "http://localhost:3000/"
|
717
713
|
end
|
718
714
|
|
719
|
-
add_index "library_groups", ["short_name"], :
|
715
|
+
add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
|
720
716
|
|
721
|
-
create_table "licenses", :
|
722
|
-
t.string "name", :
|
717
|
+
create_table "licenses", force: true do |t|
|
718
|
+
t.string "name", null: false
|
723
719
|
t.string "display_name"
|
724
720
|
t.text "note"
|
725
721
|
t.integer "position"
|
726
|
-
t.datetime "created_at"
|
727
|
-
t.datetime "updated_at"
|
722
|
+
t.datetime "created_at"
|
723
|
+
t.datetime "updated_at"
|
728
724
|
end
|
729
725
|
|
730
|
-
create_table "manifestation_checkout_stat_transitions", :
|
726
|
+
create_table "manifestation_checkout_stat_transitions", force: true do |t|
|
731
727
|
t.string "to_state"
|
732
|
-
t.text "metadata", :
|
728
|
+
t.text "metadata", default: "{}"
|
733
729
|
t.integer "sort_key"
|
734
730
|
t.integer "manifestation_checkout_stat_id"
|
735
|
-
t.datetime "created_at"
|
736
|
-
t.datetime "updated_at"
|
731
|
+
t.datetime "created_at"
|
732
|
+
t.datetime "updated_at"
|
737
733
|
end
|
738
734
|
|
739
|
-
add_index "manifestation_checkout_stat_transitions", ["manifestation_checkout_stat_id"], :
|
740
|
-
add_index "manifestation_checkout_stat_transitions", ["sort_key", "manifestation_checkout_stat_id"], :
|
735
|
+
add_index "manifestation_checkout_stat_transitions", ["manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_stat_id"
|
736
|
+
add_index "manifestation_checkout_stat_transitions", ["sort_key", "manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_transition", unique: true
|
741
737
|
|
742
|
-
create_table "manifestation_checkout_stats", :
|
738
|
+
create_table "manifestation_checkout_stats", force: true do |t|
|
743
739
|
t.datetime "start_date"
|
744
740
|
t.datetime "end_date"
|
745
741
|
t.text "note"
|
746
|
-
t.datetime "created_at"
|
747
|
-
t.datetime "updated_at"
|
742
|
+
t.datetime "created_at"
|
743
|
+
t.datetime "updated_at"
|
748
744
|
t.datetime "started_at"
|
749
745
|
t.datetime "completed_at"
|
750
746
|
t.integer "user_id"
|
751
747
|
end
|
752
748
|
|
753
|
-
add_index "manifestation_checkout_stats", ["user_id"], :
|
749
|
+
add_index "manifestation_checkout_stats", ["user_id"], name: "index_manifestation_checkout_stats_on_user_id"
|
754
750
|
|
755
|
-
create_table "manifestation_relationship_types", :
|
756
|
-
t.string "name", :
|
751
|
+
create_table "manifestation_relationship_types", force: true do |t|
|
752
|
+
t.string "name", null: false
|
757
753
|
t.text "display_name"
|
758
754
|
t.text "note"
|
759
755
|
t.integer "position"
|
760
|
-
t.datetime "created_at"
|
761
|
-
t.datetime "updated_at"
|
756
|
+
t.datetime "created_at"
|
757
|
+
t.datetime "updated_at"
|
762
758
|
end
|
763
759
|
|
764
|
-
create_table "manifestation_relationships", :
|
760
|
+
create_table "manifestation_relationships", force: true do |t|
|
765
761
|
t.integer "parent_id"
|
766
762
|
t.integer "child_id"
|
767
763
|
t.integer "manifestation_relationship_type_id"
|
768
|
-
t.datetime "created_at"
|
769
|
-
t.datetime "updated_at"
|
764
|
+
t.datetime "created_at"
|
765
|
+
t.datetime "updated_at"
|
770
766
|
t.integer "position"
|
771
767
|
end
|
772
768
|
|
773
|
-
add_index "manifestation_relationships", ["child_id"], :
|
774
|
-
add_index "manifestation_relationships", ["parent_id"], :
|
769
|
+
add_index "manifestation_relationships", ["child_id"], name: "index_manifestation_relationships_on_child_id"
|
770
|
+
add_index "manifestation_relationships", ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
|
775
771
|
|
776
|
-
create_table "manifestation_reserve_stat_transitions", :
|
772
|
+
create_table "manifestation_reserve_stat_transitions", force: true do |t|
|
777
773
|
t.string "to_state"
|
778
|
-
t.text "metadata", :
|
774
|
+
t.text "metadata", default: "{}"
|
779
775
|
t.integer "sort_key"
|
780
776
|
t.integer "manifestation_reserve_stat_id"
|
781
|
-
t.datetime "created_at"
|
782
|
-
t.datetime "updated_at"
|
777
|
+
t.datetime "created_at"
|
778
|
+
t.datetime "updated_at"
|
783
779
|
end
|
784
780
|
|
785
|
-
add_index "manifestation_reserve_stat_transitions", ["manifestation_reserve_stat_id"], :
|
786
|
-
add_index "manifestation_reserve_stat_transitions", ["sort_key", "manifestation_reserve_stat_id"], :
|
781
|
+
add_index "manifestation_reserve_stat_transitions", ["manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_stat_id"
|
782
|
+
add_index "manifestation_reserve_stat_transitions", ["sort_key", "manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_transition", unique: true
|
787
783
|
|
788
|
-
create_table "manifestation_reserve_stats", :
|
784
|
+
create_table "manifestation_reserve_stats", force: true do |t|
|
789
785
|
t.datetime "start_date"
|
790
786
|
t.datetime "end_date"
|
791
787
|
t.text "note"
|
792
|
-
t.datetime "created_at"
|
793
|
-
t.datetime "updated_at"
|
788
|
+
t.datetime "created_at"
|
789
|
+
t.datetime "updated_at"
|
794
790
|
t.datetime "started_at"
|
795
791
|
t.datetime "completed_at"
|
796
792
|
t.integer "user_id"
|
797
793
|
end
|
798
794
|
|
799
|
-
add_index "manifestation_reserve_stats", ["user_id"], :
|
795
|
+
add_index "manifestation_reserve_stats", ["user_id"], name: "index_manifestation_reserve_stats_on_user_id"
|
800
796
|
|
801
|
-
create_table "manifestations", :
|
802
|
-
t.text "original_title",
|
797
|
+
create_table "manifestations", force: true do |t|
|
798
|
+
t.text "original_title", null: false
|
803
799
|
t.text "title_alternative"
|
804
800
|
t.text "title_transcription"
|
805
801
|
t.string "classification_number"
|
806
802
|
t.string "manifestation_identifier"
|
807
803
|
t.datetime "date_of_publication"
|
808
804
|
t.datetime "date_copyrighted"
|
809
|
-
t.datetime "created_at"
|
810
|
-
t.datetime "updated_at"
|
805
|
+
t.datetime "created_at"
|
806
|
+
t.datetime "updated_at"
|
811
807
|
t.datetime "deleted_at"
|
812
808
|
t.string "access_address"
|
813
|
-
t.integer "language_id", :
|
814
|
-
t.integer "carrier_type_id", :
|
809
|
+
t.integer "language_id", default: 1, null: false
|
810
|
+
t.integer "carrier_type_id", default: 1, null: false
|
815
811
|
t.integer "start_page"
|
816
812
|
t.integer "end_page"
|
817
813
|
t.integer "height"
|
@@ -824,12 +820,12 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
824
820
|
t.string "serial_number_string"
|
825
821
|
t.integer "edition"
|
826
822
|
t.text "note"
|
827
|
-
t.boolean "repository_content", :
|
828
|
-
t.integer "lock_version", :
|
829
|
-
t.integer "required_role_id", :
|
830
|
-
t.integer "required_score", :
|
831
|
-
t.integer "frequency_id", :
|
832
|
-
t.boolean "subscription_master", :
|
823
|
+
t.boolean "repository_content", default: false, null: false
|
824
|
+
t.integer "lock_version", default: 0, null: false
|
825
|
+
t.integer "required_role_id", default: 1, null: false
|
826
|
+
t.integer "required_score", default: 0, null: false
|
827
|
+
t.integer "frequency_id", default: 1, null: false
|
828
|
+
t.boolean "subscription_master", default: false, null: false
|
833
829
|
t.string "attachment_file_name"
|
834
830
|
t.string "attachment_content_type"
|
835
831
|
t.integer "attachment_file_size"
|
@@ -847,7 +843,7 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
847
843
|
t.integer "volume_number"
|
848
844
|
t.integer "issue_number"
|
849
845
|
t.integer "serial_number"
|
850
|
-
t.integer "content_type_id", :
|
846
|
+
t.integer "content_type_id", default: 1
|
851
847
|
t.integer "year_of_publication"
|
852
848
|
t.text "attachment_meta"
|
853
849
|
t.integer "month_of_publication"
|
@@ -859,118 +855,118 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
859
855
|
t.text "dimensions"
|
860
856
|
end
|
861
857
|
|
862
|
-
add_index "manifestations", ["access_address"], :
|
863
|
-
add_index "manifestations", ["date_of_publication"], :
|
864
|
-
add_index "manifestations", ["manifestation_identifier"], :
|
865
|
-
add_index "manifestations", ["updated_at"], :
|
858
|
+
add_index "manifestations", ["access_address"], name: "index_manifestations_on_access_address"
|
859
|
+
add_index "manifestations", ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
|
860
|
+
add_index "manifestations", ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier"
|
861
|
+
add_index "manifestations", ["updated_at"], name: "index_manifestations_on_updated_at"
|
866
862
|
|
867
|
-
create_table "medium_of_performances", :
|
868
|
-
t.string "name", :
|
863
|
+
create_table "medium_of_performances", force: true do |t|
|
864
|
+
t.string "name", null: false
|
869
865
|
t.text "display_name"
|
870
866
|
t.text "note"
|
871
867
|
t.integer "position"
|
872
|
-
t.datetime "created_at"
|
873
|
-
t.datetime "updated_at"
|
868
|
+
t.datetime "created_at"
|
869
|
+
t.datetime "updated_at"
|
874
870
|
end
|
875
871
|
|
876
|
-
create_table "message_request_transitions", :
|
872
|
+
create_table "message_request_transitions", force: true do |t|
|
877
873
|
t.string "to_state"
|
878
|
-
t.text "metadata", :
|
874
|
+
t.text "metadata", default: "{}"
|
879
875
|
t.integer "sort_key"
|
880
876
|
t.integer "message_request_id"
|
881
|
-
t.datetime "created_at"
|
882
|
-
t.datetime "updated_at"
|
877
|
+
t.datetime "created_at"
|
878
|
+
t.datetime "updated_at"
|
883
879
|
end
|
884
880
|
|
885
|
-
add_index "message_request_transitions", ["message_request_id"], :
|
886
|
-
add_index "message_request_transitions", ["sort_key", "message_request_id"], :
|
881
|
+
add_index "message_request_transitions", ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
|
882
|
+
add_index "message_request_transitions", ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
|
887
883
|
|
888
|
-
create_table "message_requests", :
|
884
|
+
create_table "message_requests", force: true do |t|
|
889
885
|
t.integer "sender_id"
|
890
886
|
t.integer "receiver_id"
|
891
887
|
t.integer "message_template_id"
|
892
888
|
t.datetime "sent_at"
|
893
889
|
t.datetime "deleted_at"
|
894
890
|
t.text "body"
|
895
|
-
t.datetime "created_at"
|
896
|
-
t.datetime "updated_at"
|
891
|
+
t.datetime "created_at"
|
892
|
+
t.datetime "updated_at"
|
897
893
|
end
|
898
894
|
|
899
|
-
create_table "message_templates", :
|
900
|
-
t.string "status",
|
901
|
-
t.text "title",
|
902
|
-
t.text "body",
|
895
|
+
create_table "message_templates", force: true do |t|
|
896
|
+
t.string "status", null: false
|
897
|
+
t.text "title", null: false
|
898
|
+
t.text "body", null: false
|
903
899
|
t.integer "position"
|
904
|
-
t.string "locale", :
|
905
|
-
t.datetime "created_at"
|
906
|
-
t.datetime "updated_at"
|
900
|
+
t.string "locale", default: "ja"
|
901
|
+
t.datetime "created_at"
|
902
|
+
t.datetime "updated_at"
|
907
903
|
end
|
908
904
|
|
909
|
-
add_index "message_templates", ["status"], :
|
905
|
+
add_index "message_templates", ["status"], name: "index_message_templates_on_status", unique: true
|
910
906
|
|
911
|
-
create_table "message_transitions", :
|
907
|
+
create_table "message_transitions", force: true do |t|
|
912
908
|
t.string "to_state"
|
913
|
-
t.text "metadata", :
|
909
|
+
t.text "metadata", default: "{}"
|
914
910
|
t.integer "sort_key"
|
915
911
|
t.integer "message_id"
|
916
|
-
t.datetime "created_at"
|
917
|
-
t.datetime "updated_at"
|
912
|
+
t.datetime "created_at"
|
913
|
+
t.datetime "updated_at"
|
918
914
|
end
|
919
915
|
|
920
|
-
add_index "message_transitions", ["message_id"], :
|
921
|
-
add_index "message_transitions", ["sort_key", "message_id"], :
|
916
|
+
add_index "message_transitions", ["message_id"], name: "index_message_transitions_on_message_id"
|
917
|
+
add_index "message_transitions", ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
|
922
918
|
|
923
|
-
create_table "messages", :
|
919
|
+
create_table "messages", force: true do |t|
|
924
920
|
t.datetime "read_at"
|
925
921
|
t.integer "receiver_id"
|
926
922
|
t.integer "sender_id"
|
927
|
-
t.string "subject", :
|
923
|
+
t.string "subject", null: false
|
928
924
|
t.text "body"
|
929
925
|
t.integer "message_request_id"
|
930
926
|
t.integer "parent_id"
|
931
|
-
t.datetime "created_at"
|
932
|
-
t.datetime "updated_at"
|
927
|
+
t.datetime "created_at"
|
928
|
+
t.datetime "updated_at"
|
933
929
|
t.integer "lft"
|
934
930
|
t.integer "rgt"
|
935
931
|
t.integer "depth"
|
936
932
|
end
|
937
933
|
|
938
|
-
add_index "messages", ["message_request_id"], :
|
939
|
-
add_index "messages", ["parent_id"], :
|
940
|
-
add_index "messages", ["receiver_id"], :
|
941
|
-
add_index "messages", ["sender_id"], :
|
934
|
+
add_index "messages", ["message_request_id"], name: "index_messages_on_message_request_id"
|
935
|
+
add_index "messages", ["parent_id"], name: "index_messages_on_parent_id"
|
936
|
+
add_index "messages", ["receiver_id"], name: "index_messages_on_receiver_id"
|
937
|
+
add_index "messages", ["sender_id"], name: "index_messages_on_sender_id"
|
942
938
|
|
943
|
-
create_table "owns", :
|
944
|
-
t.integer "agent_id", :
|
945
|
-
t.integer "item_id", :
|
939
|
+
create_table "owns", force: true do |t|
|
940
|
+
t.integer "agent_id", null: false
|
941
|
+
t.integer "item_id", null: false
|
946
942
|
t.integer "position"
|
947
|
-
t.datetime "created_at"
|
948
|
-
t.datetime "updated_at"
|
943
|
+
t.datetime "created_at"
|
944
|
+
t.datetime "updated_at"
|
949
945
|
end
|
950
946
|
|
951
|
-
add_index "owns", ["agent_id"], :
|
952
|
-
add_index "owns", ["item_id"], :
|
947
|
+
add_index "owns", ["agent_id"], name: "index_owns_on_agent_id"
|
948
|
+
add_index "owns", ["item_id"], name: "index_owns_on_item_id"
|
953
949
|
|
954
|
-
create_table "participates", :
|
955
|
-
t.integer "agent_id", :
|
956
|
-
t.integer "event_id", :
|
950
|
+
create_table "participates", force: true do |t|
|
951
|
+
t.integer "agent_id", null: false
|
952
|
+
t.integer "event_id", null: false
|
957
953
|
t.integer "position"
|
958
|
-
t.datetime "created_at"
|
959
|
-
t.datetime "updated_at"
|
954
|
+
t.datetime "created_at"
|
955
|
+
t.datetime "updated_at"
|
960
956
|
end
|
961
957
|
|
962
|
-
add_index "participates", ["agent_id"], :
|
963
|
-
add_index "participates", ["event_id"], :
|
958
|
+
add_index "participates", ["agent_id"], name: "index_participates_on_agent_id"
|
959
|
+
add_index "participates", ["event_id"], name: "index_participates_on_event_id"
|
964
960
|
|
965
|
-
create_table "picture_files", :
|
961
|
+
create_table "picture_files", force: true do |t|
|
966
962
|
t.integer "picture_attachable_id"
|
967
963
|
t.string "picture_attachable_type"
|
968
964
|
t.string "content_type"
|
969
965
|
t.text "title"
|
970
966
|
t.string "thumbnail"
|
971
967
|
t.integer "position"
|
972
|
-
t.datetime "created_at"
|
973
|
-
t.datetime "updated_at"
|
968
|
+
t.datetime "created_at"
|
969
|
+
t.datetime "updated_at"
|
974
970
|
t.string "picture_file_name"
|
975
971
|
t.string "picture_content_type"
|
976
972
|
t.integer "picture_file_size"
|
@@ -979,30 +975,30 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
979
975
|
t.string "picture_fingerprint"
|
980
976
|
end
|
981
977
|
|
982
|
-
add_index "picture_files", ["picture_attachable_id", "picture_attachable_type"], :
|
978
|
+
add_index "picture_files", ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
|
983
979
|
|
984
|
-
create_table "produce_types", :
|
980
|
+
create_table "produce_types", force: true do |t|
|
985
981
|
t.string "name"
|
986
982
|
t.text "display_name"
|
987
983
|
t.text "note"
|
988
984
|
t.integer "position"
|
989
|
-
t.datetime "created_at"
|
990
|
-
t.datetime "updated_at"
|
985
|
+
t.datetime "created_at"
|
986
|
+
t.datetime "updated_at"
|
991
987
|
end
|
992
988
|
|
993
|
-
create_table "produces", :
|
994
|
-
t.integer "agent_id", :
|
995
|
-
t.integer "manifestation_id", :
|
989
|
+
create_table "produces", force: true do |t|
|
990
|
+
t.integer "agent_id", null: false
|
991
|
+
t.integer "manifestation_id", null: false
|
996
992
|
t.integer "position"
|
997
|
-
t.datetime "created_at"
|
998
|
-
t.datetime "updated_at"
|
993
|
+
t.datetime "created_at"
|
994
|
+
t.datetime "updated_at"
|
999
995
|
t.integer "produce_type_id"
|
1000
996
|
end
|
1001
997
|
|
1002
|
-
add_index "produces", ["agent_id"], :
|
1003
|
-
add_index "produces", ["manifestation_id"], :
|
998
|
+
add_index "produces", ["agent_id"], name: "index_produces_on_agent_id"
|
999
|
+
add_index "produces", ["manifestation_id"], name: "index_produces_on_manifestation_id"
|
1004
1000
|
|
1005
|
-
create_table "profiles", :
|
1001
|
+
create_table "profiles", force: true do |t|
|
1006
1002
|
t.integer "user_id"
|
1007
1003
|
t.integer "user_group_id"
|
1008
1004
|
t.integer "library_id"
|
@@ -1012,150 +1008,150 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
1012
1008
|
t.text "note"
|
1013
1009
|
t.text "keyword_list"
|
1014
1010
|
t.integer "required_role_id"
|
1015
|
-
t.datetime "created_at"
|
1016
|
-
t.datetime "updated_at"
|
1011
|
+
t.datetime "created_at"
|
1012
|
+
t.datetime "updated_at"
|
1017
1013
|
t.string "checkout_icalendar_token"
|
1018
|
-
t.boolean "save_checkout_history", :
|
1014
|
+
t.boolean "save_checkout_history", default: false, null: false
|
1019
1015
|
t.datetime "expired_at"
|
1016
|
+
t.boolean "share_bookmarks"
|
1020
1017
|
end
|
1021
1018
|
|
1022
|
-
add_index "profiles", ["checkout_icalendar_token"], :
|
1023
|
-
add_index "profiles", ["user_id"], :
|
1024
|
-
add_index "profiles", ["user_number"], :
|
1019
|
+
add_index "profiles", ["checkout_icalendar_token"], name: "index_profiles_on_checkout_icalendar_token", unique: true
|
1020
|
+
add_index "profiles", ["user_id"], name: "index_profiles_on_user_id"
|
1021
|
+
add_index "profiles", ["user_number"], name: "index_profiles_on_user_number", unique: true
|
1025
1022
|
|
1026
|
-
create_table "realize_types", :
|
1023
|
+
create_table "realize_types", force: true do |t|
|
1027
1024
|
t.string "name"
|
1028
1025
|
t.text "display_name"
|
1029
1026
|
t.text "note"
|
1030
1027
|
t.integer "position"
|
1031
|
-
t.datetime "created_at"
|
1032
|
-
t.datetime "updated_at"
|
1028
|
+
t.datetime "created_at"
|
1029
|
+
t.datetime "updated_at"
|
1033
1030
|
end
|
1034
1031
|
|
1035
|
-
create_table "realizes", :
|
1036
|
-
t.integer "agent_id", :
|
1037
|
-
t.integer "expression_id", :
|
1032
|
+
create_table "realizes", force: true do |t|
|
1033
|
+
t.integer "agent_id", null: false
|
1034
|
+
t.integer "expression_id", null: false
|
1038
1035
|
t.integer "position"
|
1039
|
-
t.datetime "created_at"
|
1040
|
-
t.datetime "updated_at"
|
1036
|
+
t.datetime "created_at"
|
1037
|
+
t.datetime "updated_at"
|
1041
1038
|
t.integer "realize_type_id"
|
1042
1039
|
end
|
1043
1040
|
|
1044
|
-
add_index "realizes", ["agent_id"], :
|
1045
|
-
add_index "realizes", ["expression_id"], :
|
1041
|
+
add_index "realizes", ["agent_id"], name: "index_realizes_on_agent_id"
|
1042
|
+
add_index "realizes", ["expression_id"], name: "index_realizes_on_expression_id"
|
1046
1043
|
|
1047
|
-
create_table "request_status_types", :
|
1048
|
-
t.string "name", :
|
1044
|
+
create_table "request_status_types", force: true do |t|
|
1045
|
+
t.string "name", null: false
|
1049
1046
|
t.text "display_name"
|
1050
1047
|
t.text "note"
|
1051
1048
|
t.integer "position"
|
1052
|
-
t.datetime "created_at"
|
1053
|
-
t.datetime "updated_at"
|
1049
|
+
t.datetime "created_at"
|
1050
|
+
t.datetime "updated_at"
|
1054
1051
|
end
|
1055
1052
|
|
1056
|
-
create_table "request_types", :
|
1057
|
-
t.string "name", :
|
1053
|
+
create_table "request_types", force: true do |t|
|
1054
|
+
t.string "name", null: false
|
1058
1055
|
t.text "display_name"
|
1059
1056
|
t.text "note"
|
1060
1057
|
t.integer "position"
|
1061
|
-
t.datetime "created_at"
|
1062
|
-
t.datetime "updated_at"
|
1058
|
+
t.datetime "created_at"
|
1059
|
+
t.datetime "updated_at"
|
1063
1060
|
end
|
1064
1061
|
|
1065
|
-
create_table "reserve_stat_has_manifestations", :
|
1066
|
-
t.integer "manifestation_reserve_stat_id", :
|
1067
|
-
t.integer "manifestation_id", :
|
1062
|
+
create_table "reserve_stat_has_manifestations", force: true do |t|
|
1063
|
+
t.integer "manifestation_reserve_stat_id", null: false
|
1064
|
+
t.integer "manifestation_id", null: false
|
1068
1065
|
t.integer "reserves_count"
|
1069
|
-
t.datetime "created_at"
|
1070
|
-
t.datetime "updated_at"
|
1066
|
+
t.datetime "created_at"
|
1067
|
+
t.datetime "updated_at"
|
1071
1068
|
end
|
1072
1069
|
|
1073
|
-
add_index "reserve_stat_has_manifestations", ["manifestation_id"], :
|
1074
|
-
add_index "reserve_stat_has_manifestations", ["manifestation_reserve_stat_id"], :
|
1070
|
+
add_index "reserve_stat_has_manifestations", ["manifestation_id"], name: "index_reserve_stat_has_manifestations_on_manifestation_id"
|
1071
|
+
add_index "reserve_stat_has_manifestations", ["manifestation_reserve_stat_id"], name: "index_reserve_stat_has_manifestations_on_m_reserve_stat_id"
|
1075
1072
|
|
1076
|
-
create_table "reserve_stat_has_users", :
|
1077
|
-
t.integer "user_reserve_stat_id", :
|
1078
|
-
t.integer "user_id", :
|
1073
|
+
create_table "reserve_stat_has_users", force: true do |t|
|
1074
|
+
t.integer "user_reserve_stat_id", null: false
|
1075
|
+
t.integer "user_id", null: false
|
1079
1076
|
t.integer "reserves_count"
|
1080
|
-
t.datetime "created_at"
|
1081
|
-
t.datetime "updated_at"
|
1077
|
+
t.datetime "created_at"
|
1078
|
+
t.datetime "updated_at"
|
1082
1079
|
end
|
1083
1080
|
|
1084
|
-
add_index "reserve_stat_has_users", ["user_id"], :
|
1085
|
-
add_index "reserve_stat_has_users", ["user_reserve_stat_id"], :
|
1081
|
+
add_index "reserve_stat_has_users", ["user_id"], name: "index_reserve_stat_has_users_on_user_id"
|
1082
|
+
add_index "reserve_stat_has_users", ["user_reserve_stat_id"], name: "index_reserve_stat_has_users_on_user_reserve_stat_id"
|
1086
1083
|
|
1087
|
-
create_table "reserve_transitions", :
|
1084
|
+
create_table "reserve_transitions", force: true do |t|
|
1088
1085
|
t.string "to_state"
|
1089
|
-
t.text "metadata", :
|
1086
|
+
t.text "metadata", default: "{}"
|
1090
1087
|
t.integer "sort_key"
|
1091
1088
|
t.integer "reserve_id"
|
1092
|
-
t.datetime "created_at"
|
1093
|
-
t.datetime "updated_at"
|
1089
|
+
t.datetime "created_at"
|
1090
|
+
t.datetime "updated_at"
|
1094
1091
|
end
|
1095
1092
|
|
1096
|
-
add_index "reserve_transitions", ["reserve_id"], :
|
1097
|
-
add_index "reserve_transitions", ["sort_key", "reserve_id"], :
|
1093
|
+
add_index "reserve_transitions", ["reserve_id"], name: "index_reserve_transitions_on_reserve_id"
|
1094
|
+
add_index "reserve_transitions", ["sort_key", "reserve_id"], name: "index_reserve_transitions_on_sort_key_and_reserve_id", unique: true
|
1098
1095
|
|
1099
|
-
create_table "reserves", :
|
1100
|
-
t.integer "user_id",
|
1101
|
-
t.integer "manifestation_id",
|
1096
|
+
create_table "reserves", force: true do |t|
|
1097
|
+
t.integer "user_id", null: false
|
1098
|
+
t.integer "manifestation_id", null: false
|
1102
1099
|
t.integer "item_id"
|
1103
|
-
t.integer "request_status_type_id",
|
1100
|
+
t.integer "request_status_type_id", null: false
|
1104
1101
|
t.datetime "checked_out_at"
|
1105
|
-
t.datetime "created_at"
|
1106
|
-
t.datetime "updated_at"
|
1102
|
+
t.datetime "created_at"
|
1103
|
+
t.datetime "updated_at"
|
1107
1104
|
t.datetime "canceled_at"
|
1108
1105
|
t.datetime "expired_at"
|
1109
1106
|
t.datetime "deleted_at"
|
1110
1107
|
t.string "state"
|
1111
|
-
t.boolean "expiration_notice_to_agent", :
|
1112
|
-
t.boolean "expiration_notice_to_library", :
|
1108
|
+
t.boolean "expiration_notice_to_agent", default: false
|
1109
|
+
t.boolean "expiration_notice_to_library", default: false
|
1113
1110
|
t.datetime "retained_at"
|
1114
1111
|
t.datetime "postponed_at"
|
1115
1112
|
end
|
1116
1113
|
|
1117
|
-
add_index "reserves", ["item_id"], :
|
1118
|
-
add_index "reserves", ["manifestation_id"], :
|
1119
|
-
add_index "reserves", ["request_status_type_id"], :
|
1120
|
-
add_index "reserves", ["
|
1121
|
-
add_index "reserves", ["user_id"], :name => "index_reserves_on_user_id"
|
1114
|
+
add_index "reserves", ["item_id"], name: "index_reserves_on_item_id"
|
1115
|
+
add_index "reserves", ["manifestation_id"], name: "index_reserves_on_manifestation_id"
|
1116
|
+
add_index "reserves", ["request_status_type_id"], name: "index_reserves_on_request_status_type_id"
|
1117
|
+
add_index "reserves", ["user_id"], name: "index_reserves_on_user_id"
|
1122
1118
|
|
1123
|
-
create_table "resource_export_file_transitions", :
|
1119
|
+
create_table "resource_export_file_transitions", force: true do |t|
|
1124
1120
|
t.string "to_state"
|
1125
|
-
t.text "metadata", :
|
1121
|
+
t.text "metadata", default: "{}"
|
1126
1122
|
t.integer "sort_key"
|
1127
1123
|
t.integer "resource_export_file_id"
|
1128
|
-
t.datetime "created_at"
|
1129
|
-
t.datetime "updated_at"
|
1124
|
+
t.datetime "created_at"
|
1125
|
+
t.datetime "updated_at"
|
1130
1126
|
end
|
1131
1127
|
|
1132
|
-
add_index "resource_export_file_transitions", ["resource_export_file_id"], :
|
1133
|
-
add_index "resource_export_file_transitions", ["sort_key", "resource_export_file_id"], :
|
1128
|
+
add_index "resource_export_file_transitions", ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
|
1129
|
+
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
|
1134
1130
|
|
1135
|
-
create_table "resource_export_files", :
|
1131
|
+
create_table "resource_export_files", force: true do |t|
|
1136
1132
|
t.integer "user_id"
|
1137
1133
|
t.string "resource_export_file_name"
|
1138
1134
|
t.string "resource_export_content_type"
|
1139
1135
|
t.integer "resource_export_file_size"
|
1140
1136
|
t.datetime "resource_export_updated_at"
|
1141
1137
|
t.datetime "executed_at"
|
1142
|
-
t.datetime "created_at"
|
1143
|
-
t.datetime "updated_at"
|
1138
|
+
t.datetime "created_at"
|
1139
|
+
t.datetime "updated_at"
|
1144
1140
|
end
|
1145
1141
|
|
1146
|
-
create_table "resource_import_file_transitions", :
|
1142
|
+
create_table "resource_import_file_transitions", force: true do |t|
|
1147
1143
|
t.string "to_state"
|
1148
|
-
t.text "metadata", :
|
1144
|
+
t.text "metadata", default: "{}"
|
1149
1145
|
t.integer "sort_key"
|
1150
1146
|
t.integer "resource_import_file_id"
|
1151
|
-
t.datetime "created_at"
|
1152
|
-
t.datetime "updated_at"
|
1147
|
+
t.datetime "created_at"
|
1148
|
+
t.datetime "updated_at"
|
1153
1149
|
end
|
1154
1150
|
|
1155
|
-
add_index "resource_import_file_transitions", ["resource_import_file_id"], :
|
1156
|
-
add_index "resource_import_file_transitions", ["sort_key", "resource_import_file_id"], :
|
1151
|
+
add_index "resource_import_file_transitions", ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
|
1152
|
+
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
|
1157
1153
|
|
1158
|
-
create_table "resource_import_files", :
|
1154
|
+
create_table "resource_import_files", force: true do |t|
|
1159
1155
|
t.integer "parent_id"
|
1160
1156
|
t.string "content_type"
|
1161
1157
|
t.integer "size"
|
@@ -1166,8 +1162,8 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
1166
1162
|
t.string "resource_import_content_type"
|
1167
1163
|
t.integer "resource_import_file_size"
|
1168
1164
|
t.datetime "resource_import_updated_at"
|
1169
|
-
t.datetime "created_at"
|
1170
|
-
t.datetime "updated_at"
|
1165
|
+
t.datetime "created_at"
|
1166
|
+
t.datetime "updated_at"
|
1171
1167
|
t.string "edit_mode"
|
1172
1168
|
t.string "resource_import_fingerprint"
|
1173
1169
|
t.text "error_message"
|
@@ -1175,70 +1171,70 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
1175
1171
|
t.integer "default_shelf_id"
|
1176
1172
|
end
|
1177
1173
|
|
1178
|
-
add_index "resource_import_files", ["parent_id"], :
|
1179
|
-
add_index "resource_import_files", ["user_id"], :
|
1174
|
+
add_index "resource_import_files", ["parent_id"], name: "index_resource_import_files_on_parent_id"
|
1175
|
+
add_index "resource_import_files", ["user_id"], name: "index_resource_import_files_on_user_id"
|
1180
1176
|
|
1181
|
-
create_table "resource_import_results", :
|
1177
|
+
create_table "resource_import_results", force: true do |t|
|
1182
1178
|
t.integer "resource_import_file_id"
|
1183
1179
|
t.integer "manifestation_id"
|
1184
1180
|
t.integer "item_id"
|
1185
1181
|
t.text "body"
|
1186
|
-
t.datetime "created_at"
|
1187
|
-
t.datetime "updated_at"
|
1182
|
+
t.datetime "created_at"
|
1183
|
+
t.datetime "updated_at"
|
1188
1184
|
t.text "error_message"
|
1189
1185
|
end
|
1190
1186
|
|
1191
|
-
add_index "resource_import_results", ["item_id"], :
|
1192
|
-
add_index "resource_import_results", ["manifestation_id"], :
|
1193
|
-
add_index "resource_import_results", ["resource_import_file_id"], :
|
1187
|
+
add_index "resource_import_results", ["item_id"], name: "index_resource_import_results_on_item_id"
|
1188
|
+
add_index "resource_import_results", ["manifestation_id"], name: "index_resource_import_results_on_manifestation_id"
|
1189
|
+
add_index "resource_import_results", ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
|
1194
1190
|
|
1195
|
-
create_table "roles", :
|
1191
|
+
create_table "roles", force: true do |t|
|
1196
1192
|
t.string "name"
|
1197
1193
|
t.text "display_name"
|
1198
1194
|
t.text "note"
|
1199
1195
|
t.integer "position"
|
1200
|
-
t.datetime "created_at"
|
1201
|
-
t.datetime "updated_at"
|
1196
|
+
t.datetime "created_at"
|
1197
|
+
t.datetime "updated_at"
|
1202
1198
|
end
|
1203
1199
|
|
1204
|
-
create_table "search_engines", :
|
1205
|
-
t.string "name", :
|
1200
|
+
create_table "search_engines", force: true do |t|
|
1201
|
+
t.string "name", null: false
|
1206
1202
|
t.text "display_name"
|
1207
|
-
t.string "url", :
|
1208
|
-
t.text "base_url", :
|
1209
|
-
t.text "http_method", :
|
1210
|
-
t.text "query_param", :
|
1203
|
+
t.string "url", null: false
|
1204
|
+
t.text "base_url", null: false
|
1205
|
+
t.text "http_method", null: false
|
1206
|
+
t.text "query_param", null: false
|
1211
1207
|
t.text "additional_param"
|
1212
1208
|
t.text "note"
|
1213
1209
|
t.integer "position"
|
1214
|
-
t.datetime "created_at"
|
1215
|
-
t.datetime "updated_at"
|
1210
|
+
t.datetime "created_at"
|
1211
|
+
t.datetime "updated_at"
|
1216
1212
|
end
|
1217
1213
|
|
1218
|
-
create_table "series_statement_merge_lists", :
|
1214
|
+
create_table "series_statement_merge_lists", force: true do |t|
|
1219
1215
|
t.string "title"
|
1220
|
-
t.datetime "created_at"
|
1221
|
-
t.datetime "updated_at"
|
1216
|
+
t.datetime "created_at"
|
1217
|
+
t.datetime "updated_at"
|
1222
1218
|
end
|
1223
1219
|
|
1224
|
-
create_table "series_statement_merges", :
|
1225
|
-
t.integer "series_statement_id", :
|
1226
|
-
t.integer "series_statement_merge_list_id", :
|
1227
|
-
t.datetime "created_at"
|
1228
|
-
t.datetime "updated_at"
|
1220
|
+
create_table "series_statement_merges", force: true do |t|
|
1221
|
+
t.integer "series_statement_id", null: false
|
1222
|
+
t.integer "series_statement_merge_list_id", null: false
|
1223
|
+
t.datetime "created_at"
|
1224
|
+
t.datetime "updated_at"
|
1229
1225
|
end
|
1230
1226
|
|
1231
|
-
add_index "series_statement_merges", ["series_statement_id"], :
|
1232
|
-
add_index "series_statement_merges", ["series_statement_merge_list_id"], :
|
1227
|
+
add_index "series_statement_merges", ["series_statement_id"], name: "index_series_statement_merges_on_series_statement_id"
|
1228
|
+
add_index "series_statement_merges", ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id"
|
1233
1229
|
|
1234
|
-
create_table "series_statements", :
|
1230
|
+
create_table "series_statements", force: true do |t|
|
1235
1231
|
t.text "original_title"
|
1236
1232
|
t.text "numbering"
|
1237
1233
|
t.text "title_subseries"
|
1238
1234
|
t.text "numbering_subseries"
|
1239
1235
|
t.integer "position"
|
1240
|
-
t.datetime "created_at"
|
1241
|
-
t.datetime "updated_at"
|
1236
|
+
t.datetime "created_at"
|
1237
|
+
t.datetime "updated_at"
|
1242
1238
|
t.text "title_transcription"
|
1243
1239
|
t.text "title_alternative"
|
1244
1240
|
t.string "series_statement_identifier"
|
@@ -1252,63 +1248,63 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
1252
1248
|
t.integer "root_manifestation_id"
|
1253
1249
|
end
|
1254
1250
|
|
1255
|
-
add_index "series_statements", ["manifestation_id"], :
|
1256
|
-
add_index "series_statements", ["root_manifestation_id"], :
|
1257
|
-
add_index "series_statements", ["series_statement_identifier"], :
|
1251
|
+
add_index "series_statements", ["manifestation_id"], name: "index_series_statements_on_manifestation_id"
|
1252
|
+
add_index "series_statements", ["root_manifestation_id"], name: "index_series_statements_on_root_manifestation_id"
|
1253
|
+
add_index "series_statements", ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
|
1258
1254
|
|
1259
|
-
create_table "shelves", :
|
1260
|
-
t.string "name",
|
1255
|
+
create_table "shelves", force: true do |t|
|
1256
|
+
t.string "name", null: false
|
1261
1257
|
t.text "display_name"
|
1262
1258
|
t.text "note"
|
1263
|
-
t.integer "library_id", :
|
1264
|
-
t.integer "items_count", :
|
1259
|
+
t.integer "library_id", default: 1, null: false
|
1260
|
+
t.integer "items_count", default: 0, null: false
|
1265
1261
|
t.integer "position"
|
1266
|
-
t.datetime "created_at"
|
1267
|
-
t.datetime "updated_at"
|
1262
|
+
t.datetime "created_at"
|
1263
|
+
t.datetime "updated_at"
|
1268
1264
|
t.datetime "deleted_at"
|
1269
|
-
t.boolean "closed", :
|
1265
|
+
t.boolean "closed", default: false, null: false
|
1270
1266
|
end
|
1271
1267
|
|
1272
|
-
add_index "shelves", ["library_id"], :
|
1268
|
+
add_index "shelves", ["library_id"], name: "index_shelves_on_library_id"
|
1273
1269
|
|
1274
|
-
create_table "subject_heading_type_has_subjects", :
|
1275
|
-
t.integer "subject_id", :
|
1270
|
+
create_table "subject_heading_type_has_subjects", force: true do |t|
|
1271
|
+
t.integer "subject_id", null: false
|
1276
1272
|
t.string "subject_type"
|
1277
|
-
t.integer "subject_heading_type_id", :
|
1278
|
-
t.datetime "created_at"
|
1279
|
-
t.datetime "updated_at"
|
1273
|
+
t.integer "subject_heading_type_id", null: false
|
1274
|
+
t.datetime "created_at"
|
1275
|
+
t.datetime "updated_at"
|
1280
1276
|
end
|
1281
1277
|
|
1282
|
-
add_index "subject_heading_type_has_subjects", ["subject_id"], :
|
1278
|
+
add_index "subject_heading_type_has_subjects", ["subject_id"], name: "index_subject_heading_type_has_subjects_on_subject_id"
|
1283
1279
|
|
1284
|
-
create_table "subject_heading_types", :
|
1285
|
-
t.string "name", :
|
1280
|
+
create_table "subject_heading_types", force: true do |t|
|
1281
|
+
t.string "name", null: false
|
1286
1282
|
t.text "display_name"
|
1287
1283
|
t.text "note"
|
1288
1284
|
t.integer "position"
|
1289
|
-
t.datetime "created_at"
|
1290
|
-
t.datetime "updated_at"
|
1285
|
+
t.datetime "created_at"
|
1286
|
+
t.datetime "updated_at"
|
1291
1287
|
end
|
1292
1288
|
|
1293
|
-
create_table "subject_types", :
|
1294
|
-
t.string "name", :
|
1289
|
+
create_table "subject_types", force: true do |t|
|
1290
|
+
t.string "name", null: false
|
1295
1291
|
t.text "display_name"
|
1296
1292
|
t.text "note"
|
1297
1293
|
t.integer "position"
|
1298
|
-
t.datetime "created_at"
|
1299
|
-
t.datetime "updated_at"
|
1294
|
+
t.datetime "created_at"
|
1295
|
+
t.datetime "updated_at"
|
1300
1296
|
end
|
1301
1297
|
|
1302
|
-
create_table "subjects", :
|
1298
|
+
create_table "subjects", force: true do |t|
|
1303
1299
|
t.integer "parent_id"
|
1304
1300
|
t.integer "use_term_id"
|
1305
1301
|
t.string "term"
|
1306
1302
|
t.text "term_transcription"
|
1307
|
-
t.integer "subject_type_id",
|
1303
|
+
t.integer "subject_type_id", null: false
|
1308
1304
|
t.text "scope_note"
|
1309
1305
|
t.text "note"
|
1310
|
-
t.integer "required_role_id", :
|
1311
|
-
t.integer "lock_version", :
|
1306
|
+
t.integer "required_role_id", default: 1, null: false
|
1307
|
+
t.integer "lock_version", default: 0, null: false
|
1312
1308
|
t.datetime "created_at"
|
1313
1309
|
t.datetime "updated_at"
|
1314
1310
|
t.datetime "deleted_at"
|
@@ -1317,14 +1313,14 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
1317
1313
|
t.integer "subject_heading_type_id"
|
1318
1314
|
end
|
1319
1315
|
|
1320
|
-
add_index "subjects", ["manifestation_id"], :
|
1321
|
-
add_index "subjects", ["parent_id"], :
|
1322
|
-
add_index "subjects", ["required_role_id"], :
|
1323
|
-
add_index "subjects", ["subject_type_id"], :
|
1324
|
-
add_index "subjects", ["term"], :
|
1325
|
-
add_index "subjects", ["use_term_id"], :
|
1316
|
+
add_index "subjects", ["manifestation_id"], name: "index_subjects_on_manifestation_id"
|
1317
|
+
add_index "subjects", ["parent_id"], name: "index_subjects_on_parent_id"
|
1318
|
+
add_index "subjects", ["required_role_id"], name: "index_subjects_on_required_role_id"
|
1319
|
+
add_index "subjects", ["subject_type_id"], name: "index_subjects_on_subject_type_id"
|
1320
|
+
add_index "subjects", ["term"], name: "index_subjects_on_term"
|
1321
|
+
add_index "subjects", ["use_term_id"], name: "index_subjects_on_use_term_id"
|
1326
1322
|
|
1327
|
-
create_table "taggings", :
|
1323
|
+
create_table "taggings", force: true do |t|
|
1328
1324
|
t.integer "tag_id"
|
1329
1325
|
t.integer "taggable_id"
|
1330
1326
|
t.string "taggable_type"
|
@@ -1334,129 +1330,129 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
1334
1330
|
t.datetime "created_at"
|
1335
1331
|
end
|
1336
1332
|
|
1337
|
-
add_index "taggings", ["tag_id"], :
|
1338
|
-
add_index "taggings", ["taggable_id", "taggable_type", "context"], :
|
1333
|
+
add_index "taggings", ["tag_id"], name: "index_taggings_on_tag_id"
|
1334
|
+
add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"
|
1339
1335
|
|
1340
|
-
create_table "tags", :
|
1336
|
+
create_table "tags", force: true do |t|
|
1341
1337
|
t.string "name"
|
1342
1338
|
t.string "name_transcription"
|
1343
|
-
t.datetime "created_at"
|
1344
|
-
t.datetime "updated_at"
|
1339
|
+
t.datetime "created_at"
|
1340
|
+
t.datetime "updated_at"
|
1345
1341
|
end
|
1346
1342
|
|
1347
|
-
create_table "use_restrictions", :
|
1348
|
-
t.string "name", :
|
1343
|
+
create_table "use_restrictions", force: true do |t|
|
1344
|
+
t.string "name", null: false
|
1349
1345
|
t.text "display_name"
|
1350
1346
|
t.text "note"
|
1351
1347
|
t.integer "position"
|
1352
|
-
t.datetime "created_at"
|
1353
|
-
t.datetime "updated_at"
|
1348
|
+
t.datetime "created_at"
|
1349
|
+
t.datetime "updated_at"
|
1354
1350
|
end
|
1355
1351
|
|
1356
|
-
create_table "user_checkout_stat_transitions", :
|
1352
|
+
create_table "user_checkout_stat_transitions", force: true do |t|
|
1357
1353
|
t.string "to_state"
|
1358
|
-
t.text "metadata", :
|
1354
|
+
t.text "metadata", default: "{}"
|
1359
1355
|
t.integer "sort_key"
|
1360
1356
|
t.integer "user_checkout_stat_id"
|
1361
|
-
t.datetime "created_at"
|
1362
|
-
t.datetime "updated_at"
|
1357
|
+
t.datetime "created_at"
|
1358
|
+
t.datetime "updated_at"
|
1363
1359
|
end
|
1364
1360
|
|
1365
|
-
add_index "user_checkout_stat_transitions", ["sort_key", "user_checkout_stat_id"], :
|
1366
|
-
add_index "user_checkout_stat_transitions", ["user_checkout_stat_id"], :
|
1361
|
+
add_index "user_checkout_stat_transitions", ["sort_key", "user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_sort_key_and_stat_id", unique: true
|
1362
|
+
add_index "user_checkout_stat_transitions", ["user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_user_checkout_stat_id"
|
1367
1363
|
|
1368
|
-
create_table "user_checkout_stats", :
|
1364
|
+
create_table "user_checkout_stats", force: true do |t|
|
1369
1365
|
t.datetime "start_date"
|
1370
1366
|
t.datetime "end_date"
|
1371
1367
|
t.text "note"
|
1372
|
-
t.datetime "created_at"
|
1373
|
-
t.datetime "updated_at"
|
1368
|
+
t.datetime "created_at"
|
1369
|
+
t.datetime "updated_at"
|
1374
1370
|
t.datetime "started_at"
|
1375
1371
|
t.datetime "completed_at"
|
1376
1372
|
t.integer "user_id"
|
1377
1373
|
end
|
1378
1374
|
|
1379
|
-
add_index "user_checkout_stats", ["user_id"], :
|
1375
|
+
add_index "user_checkout_stats", ["user_id"], name: "index_user_checkout_stats_on_user_id"
|
1380
1376
|
|
1381
|
-
create_table "user_export_file_transitions", :
|
1377
|
+
create_table "user_export_file_transitions", force: true do |t|
|
1382
1378
|
t.string "to_state"
|
1383
|
-
t.text "metadata", :
|
1379
|
+
t.text "metadata", default: "{}"
|
1384
1380
|
t.integer "sort_key"
|
1385
1381
|
t.integer "user_export_file_id"
|
1386
|
-
t.datetime "created_at"
|
1387
|
-
t.datetime "updated_at"
|
1382
|
+
t.datetime "created_at"
|
1383
|
+
t.datetime "updated_at"
|
1388
1384
|
end
|
1389
1385
|
|
1390
|
-
add_index "user_export_file_transitions", ["sort_key", "user_export_file_id"], :
|
1391
|
-
add_index "user_export_file_transitions", ["user_export_file_id"], :
|
1386
|
+
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
|
1387
|
+
add_index "user_export_file_transitions", ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
|
1392
1388
|
|
1393
|
-
create_table "user_export_files", :
|
1389
|
+
create_table "user_export_files", force: true do |t|
|
1394
1390
|
t.integer "user_id"
|
1395
1391
|
t.string "user_export_file_name"
|
1396
1392
|
t.string "user_export_content_type"
|
1397
1393
|
t.integer "user_export_file_size"
|
1398
1394
|
t.datetime "user_export_updated_at"
|
1399
1395
|
t.datetime "executed_at"
|
1400
|
-
t.datetime "created_at"
|
1401
|
-
t.datetime "updated_at"
|
1402
|
-
end
|
1403
|
-
|
1404
|
-
create_table "user_group_has_checkout_types", :
|
1405
|
-
t.integer "user_group_id",
|
1406
|
-
t.integer "checkout_type_id",
|
1407
|
-
t.integer "checkout_limit", :
|
1408
|
-
t.integer "checkout_period", :
|
1409
|
-
t.integer "checkout_renewal_limit", :
|
1410
|
-
t.integer "reservation_limit", :
|
1411
|
-
t.integer "reservation_expired_period", :
|
1412
|
-
t.boolean "set_due_date_before_closing_day", :
|
1396
|
+
t.datetime "created_at"
|
1397
|
+
t.datetime "updated_at"
|
1398
|
+
end
|
1399
|
+
|
1400
|
+
create_table "user_group_has_checkout_types", force: true do |t|
|
1401
|
+
t.integer "user_group_id", null: false
|
1402
|
+
t.integer "checkout_type_id", null: false
|
1403
|
+
t.integer "checkout_limit", default: 0, null: false
|
1404
|
+
t.integer "checkout_period", default: 0, null: false
|
1405
|
+
t.integer "checkout_renewal_limit", default: 0, null: false
|
1406
|
+
t.integer "reservation_limit", default: 0, null: false
|
1407
|
+
t.integer "reservation_expired_period", default: 7, null: false
|
1408
|
+
t.boolean "set_due_date_before_closing_day", default: false, null: false
|
1413
1409
|
t.datetime "fixed_due_date"
|
1414
1410
|
t.text "note"
|
1415
1411
|
t.integer "position"
|
1416
|
-
t.datetime "created_at"
|
1417
|
-
t.datetime "updated_at"
|
1412
|
+
t.datetime "created_at"
|
1413
|
+
t.datetime "updated_at"
|
1418
1414
|
t.integer "current_checkout_count"
|
1419
1415
|
end
|
1420
1416
|
|
1421
|
-
add_index "user_group_has_checkout_types", ["checkout_type_id"], :
|
1422
|
-
add_index "user_group_has_checkout_types", ["user_group_id"], :
|
1417
|
+
add_index "user_group_has_checkout_types", ["checkout_type_id"], name: "index_user_group_has_checkout_types_on_checkout_type_id"
|
1418
|
+
add_index "user_group_has_checkout_types", ["user_group_id"], name: "index_user_group_has_checkout_types_on_user_group_id"
|
1423
1419
|
|
1424
|
-
create_table "user_groups", :
|
1420
|
+
create_table "user_groups", force: true do |t|
|
1425
1421
|
t.string "name"
|
1426
|
-
t.
|
1422
|
+
t.text "string"
|
1427
1423
|
t.text "display_name"
|
1428
1424
|
t.text "note"
|
1429
1425
|
t.integer "position"
|
1430
|
-
t.datetime "created_at"
|
1431
|
-
t.datetime "updated_at"
|
1426
|
+
t.datetime "created_at"
|
1427
|
+
t.datetime "updated_at"
|
1432
1428
|
t.datetime "deleted_at"
|
1433
|
-
t.integer "valid_period_for_new_user", :
|
1429
|
+
t.integer "valid_period_for_new_user", default: 0, null: false
|
1434
1430
|
t.datetime "expired_at"
|
1435
|
-
t.integer "number_of_day_to_notify_overdue", :
|
1436
|
-
t.integer "number_of_day_to_notify_due_date", :
|
1437
|
-
t.integer "number_of_time_to_notify_overdue", :
|
1431
|
+
t.integer "number_of_day_to_notify_overdue", default: 1, null: false
|
1432
|
+
t.integer "number_of_day_to_notify_due_date", default: 7, null: false
|
1433
|
+
t.integer "number_of_time_to_notify_overdue", default: 3, null: false
|
1438
1434
|
end
|
1439
1435
|
|
1440
|
-
create_table "user_has_roles", :
|
1436
|
+
create_table "user_has_roles", force: true do |t|
|
1441
1437
|
t.integer "user_id"
|
1442
1438
|
t.integer "role_id"
|
1443
|
-
t.datetime "created_at"
|
1444
|
-
t.datetime "updated_at"
|
1439
|
+
t.datetime "created_at"
|
1440
|
+
t.datetime "updated_at"
|
1445
1441
|
end
|
1446
1442
|
|
1447
|
-
create_table "user_import_file_transitions", :
|
1443
|
+
create_table "user_import_file_transitions", force: true do |t|
|
1448
1444
|
t.string "to_state"
|
1449
|
-
t.text "metadata", :
|
1445
|
+
t.text "metadata", default: "{}"
|
1450
1446
|
t.integer "sort_key"
|
1451
1447
|
t.integer "user_import_file_id"
|
1452
|
-
t.datetime "created_at"
|
1453
|
-
t.datetime "updated_at"
|
1448
|
+
t.datetime "created_at"
|
1449
|
+
t.datetime "updated_at"
|
1454
1450
|
end
|
1455
1451
|
|
1456
|
-
add_index "user_import_file_transitions", ["sort_key", "user_import_file_id"], :
|
1457
|
-
add_index "user_import_file_transitions", ["user_import_file_id"], :
|
1452
|
+
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
|
1453
|
+
add_index "user_import_file_transitions", ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
|
1458
1454
|
|
1459
|
-
create_table "user_import_files", :
|
1455
|
+
create_table "user_import_files", force: true do |t|
|
1460
1456
|
t.integer "user_id"
|
1461
1457
|
t.text "note"
|
1462
1458
|
t.datetime "executed_at"
|
@@ -1467,108 +1463,107 @@ ActiveRecord::Schema.define(:version => 20140823095740) do
|
|
1467
1463
|
t.string "user_import_fingerprint"
|
1468
1464
|
t.string "edit_mode"
|
1469
1465
|
t.text "error_message"
|
1470
|
-
t.datetime "created_at"
|
1471
|
-
t.datetime "updated_at"
|
1466
|
+
t.datetime "created_at"
|
1467
|
+
t.datetime "updated_at"
|
1472
1468
|
t.string "user_encoding"
|
1473
1469
|
t.integer "default_library_id"
|
1474
1470
|
t.integer "default_user_group_id"
|
1475
1471
|
end
|
1476
1472
|
|
1477
|
-
create_table "user_import_results", :
|
1473
|
+
create_table "user_import_results", force: true do |t|
|
1478
1474
|
t.integer "user_import_file_id"
|
1479
1475
|
t.integer "user_id"
|
1480
1476
|
t.text "body"
|
1481
|
-
t.datetime "created_at"
|
1482
|
-
t.datetime "updated_at"
|
1477
|
+
t.datetime "created_at"
|
1478
|
+
t.datetime "updated_at"
|
1483
1479
|
end
|
1484
1480
|
|
1485
|
-
create_table "user_reserve_stat_transitions", :
|
1481
|
+
create_table "user_reserve_stat_transitions", force: true do |t|
|
1486
1482
|
t.string "to_state"
|
1487
|
-
t.text "metadata", :
|
1483
|
+
t.text "metadata", default: "{}"
|
1488
1484
|
t.integer "sort_key"
|
1489
1485
|
t.integer "user_reserve_stat_id"
|
1490
|
-
t.datetime "created_at"
|
1491
|
-
t.datetime "updated_at"
|
1486
|
+
t.datetime "created_at"
|
1487
|
+
t.datetime "updated_at"
|
1492
1488
|
end
|
1493
1489
|
|
1494
|
-
add_index "user_reserve_stat_transitions", ["sort_key", "user_reserve_stat_id"], :
|
1495
|
-
add_index "user_reserve_stat_transitions", ["user_reserve_stat_id"], :
|
1490
|
+
add_index "user_reserve_stat_transitions", ["sort_key", "user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_sort_key_and_stat_id", unique: true
|
1491
|
+
add_index "user_reserve_stat_transitions", ["user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_user_reserve_stat_id"
|
1496
1492
|
|
1497
|
-
create_table "user_reserve_stats", :
|
1493
|
+
create_table "user_reserve_stats", force: true do |t|
|
1498
1494
|
t.datetime "start_date"
|
1499
1495
|
t.datetime "end_date"
|
1500
1496
|
t.text "note"
|
1501
|
-
t.datetime "created_at"
|
1502
|
-
t.datetime "updated_at"
|
1497
|
+
t.datetime "created_at"
|
1498
|
+
t.datetime "updated_at"
|
1503
1499
|
t.datetime "started_at"
|
1504
1500
|
t.datetime "completed_at"
|
1505
1501
|
t.integer "user_id"
|
1506
1502
|
end
|
1507
1503
|
|
1508
|
-
add_index "user_reserve_stats", ["user_id"], :
|
1504
|
+
add_index "user_reserve_stats", ["user_id"], name: "index_user_reserve_stats_on_user_id"
|
1509
1505
|
|
1510
|
-
create_table "users", :
|
1511
|
-
t.string "email", :
|
1512
|
-
t.string "encrypted_password", :
|
1506
|
+
create_table "users", force: true do |t|
|
1507
|
+
t.string "email", default: "", null: false
|
1508
|
+
t.string "encrypted_password", default: "", null: false
|
1513
1509
|
t.string "reset_password_token"
|
1514
1510
|
t.datetime "reset_password_sent_at"
|
1515
1511
|
t.datetime "remember_created_at"
|
1516
|
-
t.integer "sign_in_count", :
|
1512
|
+
t.integer "sign_in_count", default: 0, null: false
|
1517
1513
|
t.datetime "current_sign_in_at"
|
1518
1514
|
t.datetime "last_sign_in_at"
|
1519
1515
|
t.string "current_sign_in_ip"
|
1520
1516
|
t.string "last_sign_in_ip"
|
1521
|
-
t.datetime "created_at"
|
1522
|
-
t.datetime "updated_at"
|
1523
|
-
t.boolean "save_checkout_history", :
|
1517
|
+
t.datetime "created_at"
|
1518
|
+
t.datetime "updated_at"
|
1519
|
+
t.boolean "save_checkout_history", default: false, null: false
|
1524
1520
|
t.string "checkout_icalendar_token"
|
1525
|
-
t.boolean "share_bookmarks"
|
1526
1521
|
t.string "username"
|
1527
1522
|
t.string "user_number"
|
1528
1523
|
t.string "state"
|
1529
1524
|
t.string "locale"
|
1530
1525
|
t.datetime "deleted_at"
|
1531
1526
|
t.datetime "expired_at"
|
1532
|
-
t.integer "library_id", :
|
1533
|
-
t.integer "required_role_id", :
|
1534
|
-
t.integer "user_group_id", :
|
1527
|
+
t.integer "library_id", default: 1, null: false
|
1528
|
+
t.integer "required_role_id", default: 1, null: false
|
1529
|
+
t.integer "user_group_id", default: 1, null: false
|
1535
1530
|
t.text "note"
|
1536
1531
|
t.text "keyword_list"
|
1537
|
-
t.integer "failed_attempts", :
|
1532
|
+
t.integer "failed_attempts", default: 0
|
1538
1533
|
t.string "unlock_token"
|
1539
1534
|
t.datetime "locked_at"
|
1540
1535
|
t.datetime "confirmed_at"
|
1541
1536
|
end
|
1542
1537
|
|
1543
|
-
add_index "users", ["checkout_icalendar_token"], :
|
1544
|
-
add_index "users", ["email"], :
|
1545
|
-
add_index "users", ["reset_password_token"], :
|
1546
|
-
add_index "users", ["unlock_token"], :
|
1547
|
-
add_index "users", ["user_group_id"], :
|
1548
|
-
add_index "users", ["user_number"], :
|
1549
|
-
add_index "users", ["username"], :
|
1538
|
+
add_index "users", ["checkout_icalendar_token"], name: "index_users_on_checkout_icalendar_token", unique: true
|
1539
|
+
add_index "users", ["email"], name: "index_users_on_email"
|
1540
|
+
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
1541
|
+
add_index "users", ["unlock_token"], name: "index_users_on_unlock_token", unique: true
|
1542
|
+
add_index "users", ["user_group_id"], name: "index_users_on_user_group_id"
|
1543
|
+
add_index "users", ["user_number"], name: "index_users_on_user_number", unique: true
|
1544
|
+
add_index "users", ["username"], name: "index_users_on_username", unique: true
|
1550
1545
|
|
1551
|
-
create_table "versions", :
|
1552
|
-
t.string "item_type", :
|
1553
|
-
t.integer "item_id", :
|
1554
|
-
t.string "event", :
|
1546
|
+
create_table "versions", force: true do |t|
|
1547
|
+
t.string "item_type", null: false
|
1548
|
+
t.integer "item_id", null: false
|
1549
|
+
t.string "event", null: false
|
1555
1550
|
t.string "whodunnit"
|
1556
1551
|
t.text "object"
|
1557
1552
|
t.datetime "created_at"
|
1558
1553
|
end
|
1559
1554
|
|
1560
|
-
add_index "versions", ["item_type", "item_id"], :
|
1555
|
+
add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
|
1561
1556
|
|
1562
|
-
create_table "work_has_subjects", :
|
1557
|
+
create_table "work_has_subjects", force: true do |t|
|
1563
1558
|
t.integer "subject_id"
|
1564
1559
|
t.string "subject_type"
|
1565
1560
|
t.integer "work_id"
|
1566
1561
|
t.integer "position"
|
1567
|
-
t.datetime "created_at"
|
1568
|
-
t.datetime "updated_at"
|
1562
|
+
t.datetime "created_at"
|
1563
|
+
t.datetime "updated_at"
|
1569
1564
|
end
|
1570
1565
|
|
1571
|
-
add_index "work_has_subjects", ["subject_id"], :
|
1572
|
-
add_index "work_has_subjects", ["work_id"], :
|
1566
|
+
add_index "work_has_subjects", ["subject_id"], name: "index_work_has_subjects_on_subject_id"
|
1567
|
+
add_index "work_has_subjects", ["work_id"], name: "index_work_has_subjects_on_work_id"
|
1573
1568
|
|
1574
1569
|
end
|