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