enju_ndl 0.1.0.pre32 → 0.1.0.pre33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/ndl_books_controller.rb +3 -5
- data/app/models/ndl_book.rb +1 -1
- data/app/views/ndl_books/index.html.erb +2 -2
- data/lib/enju_ndl/ndl_search.rb +3 -1
- data/lib/enju_ndl/version.rb +1 -1
- data/spec/cassette_library/ImportRequest/should_import_isbn.yml +292 -253
- data/spec/cassette_library/Manifestation/should_imporrt_a_bibliographic_record.yml +760 -741
- data/spec/cassette_library/Manifestation/should_import_isbn.yml +294 -255
- data/spec/cassette_library/NdlBook/import/should_get_series_title.yml +18 -13
- data/spec/cassette_library/NdlBook/import/should_get_volume_number.yml +18 -13
- data/spec/cassette_library/NdlBook/import/should_import_audio_cd.yml +7 -7
- data/spec/cassette_library/NdlBook/import/should_import_bibliographic_record.yml +134 -134
- data/spec/cassette_library/NdlBook/import/should_import_bibliographic_record_that_does_not_have_any_classifications.yml +126 -124
- data/spec/cassette_library/NdlBook/import/should_import_publication_place.yml +239 -0
- data/spec/cassette_library/NdlBook/import/should_import_pud_date_is_nil.yml +8 -8
- data/spec/cassette_library/NdlBook/import/should_import_series_statement.yml +154 -152
- data/spec/cassette_library/NdlBook/import/should_import_series_statement_if_the_resource_is_periodical.yml +129 -122
- data/spec/cassette_library/NdlBook/import/should_import_title_alternative.yml +155 -154
- data/spec/cassette_library/NdlBook/import/should_import_url_contain_whitespace.yml +135 -138
- data/spec/cassette_library/NdlBook/import/should_import_video_dvd.yml +7 -7
- data/spec/cassette_library/NdlBook/import/should_import_volume_number_string.yml +152 -154
- data/spec/cassette_library/NdlBook/import/should_not_get_series_title_if_book_has_not_series_title.yml +23 -13
- data/spec/cassette_library/NdlBook/import/should_not_get_volume_number_if_book_has_not_volume.yml +20 -12
- data/spec/cassette_library/NdlBook/search/should_not_distinguish_double_byte_space_from_one-byte_space_in_a_query.yml +189 -145
- data/spec/cassette_library/NdlBook/search/should_search_bibliographic_record.yml +42 -40
- data/spec/cassette_library/NdlBooksController/GET_index/should_get_index.yml +302 -272
- data/spec/cassette_library/NdlBooksController/POST_create/should_create_a_bibliographic_record_if_jpno_is_set.yml +173 -174
- data/spec/cassette_library/NdlBooksController/POST_create/should_not_create_a_bibliographic_record_if_jpno_is_not_set.yml +8 -8
- data/spec/cassette_library/Question/should_respond_to_search_crd.yml +310 -265
- data/spec/dummy/db/migrate/001_create_agents.rb +0 -3
- data/spec/dummy/db/migrate/002_devise_create_users.rb +46 -0
- data/spec/dummy/db/migrate/005_create_manifestations.rb +7 -7
- data/spec/dummy/db/migrate/006_create_items.rb +0 -3
- data/spec/dummy/db/migrate/032_create_checkins.rb +17 -0
- data/spec/dummy/db/migrate/033_create_checkouts.rb +25 -0
- data/spec/dummy/db/migrate/035_create_reserves.rb +27 -0
- data/spec/dummy/db/migrate/041_create_roles.rb +13 -0
- data/spec/dummy/db/migrate/077_create_user_groups.rb +12 -0
- data/spec/dummy/db/migrate/113_create_events.rb +23 -0
- data/spec/dummy/db/migrate/114_create_event_categories.rb +16 -0
- data/spec/dummy/db/migrate/121_create_checked_items.rb +17 -0
- data/spec/dummy/db/migrate/127_create_use_restrictions.rb +16 -0
- data/spec/dummy/db/migrate/129_create_item_has_use_restrictions.rb +16 -0
- data/spec/dummy/db/migrate/132_create_circulation_statuses.rb +16 -0
- data/spec/dummy/db/migrate/149_create_message_templates.rb +18 -0
- data/spec/dummy/db/migrate/154_create_messages.rb +23 -0
- data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +18 -0
- data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +0 -2
- data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +1 -3
- data/spec/dummy/db/migrate/20081028093607_create_event_import_files.rb +25 -0
- data/spec/dummy/db/migrate/20081030023412_create_checkout_types.rb +17 -0
- data/spec/dummy/db/migrate/20081030023518_create_user_group_has_checkout_types.rb +25 -0
- data/spec/dummy/db/migrate/20081030023615_create_carrier_type_has_checkout_types.rb +18 -0
- data/spec/dummy/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb +17 -0
- data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +15 -0
- data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +15 -0
- data/spec/dummy/db/migrate/20081215094955_create_checkout_stat_has_users.rb +17 -0
- data/spec/dummy/db/migrate/20081216190517_create_reserve_stat_has_manifestations.rb +17 -0
- data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +15 -0
- data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +15 -0
- data/spec/dummy/db/migrate/20081220034117_create_reserve_stat_has_users.rb +17 -0
- data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +23 -0
- data/spec/dummy/db/migrate/20090519203307_create_participates.rb +17 -0
- data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +21 -0
- data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +0 -1
- data/spec/dummy/db/migrate/{20111201163718_create_user_has_roles.rb → 20100606065209_create_user_has_roles.rb} +2 -0
- data/spec/dummy/db/migrate/20100925074639_create_event_import_results.rb +15 -0
- data/spec/dummy/db/migrate/20110301134521_add_expire_date_to_reserve.rb +9 -0
- data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +11 -0
- data/spec/dummy/db/migrate/20110328130826_add_current_checkout_count_to_user_group_has_checkout_type.rb +9 -0
- data/spec/dummy/db/migrate/20110621093332_remove_expire_date_from_reserve.rb +9 -0
- data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +13 -0
- data/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +11 -0
- data/spec/dummy/db/migrate/20111217234412_add_save_checkout_history_to_user.rb +5 -0
- data/spec/dummy/db/migrate/20111218002349_add_checkout_icalendar_token_to_user.rb +6 -0
- data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +6 -0
- data/spec/dummy/db/migrate/20120413051535_add_event_import_fingerprint_to_event_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413170734_add_error_message_to_event_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120415060342_rename_event_import_file_imported_at_to_executed_at.rb +9 -0
- data/spec/dummy/db/migrate/20120424103932_add_librarian_id_to_checked_item.rb +5 -0
- data/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +16 -0
- data/spec/dummy/db/migrate/20130303104849_add_state_index_to_reserve.rb +5 -0
- data/spec/dummy/db/migrate/20130303124821_add_retained_at_to_reserve.rb +5 -0
- data/spec/dummy/db/migrate/20130304015019_add_postponed_at_to_reserve.rb +5 -0
- data/spec/dummy/db/migrate/20130416054135_add_circulation_status_id_to_item.rb +8 -0
- data/spec/dummy/db/migrate/20130519065638_add_lock_version_to_reserve.rb +5 -0
- data/spec/dummy/db/migrate/20130519065837_add_lock_version_to_checkin.rb +5 -0
- data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +18 -0
- data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +11 -0
- data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +20 -0
- data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140523171309_create_event_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +11 -0
- data/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb +11 -0
- data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140628071719_add_user_encoding_to_event_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +11 -0
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +8 -0
- data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140720192418_add_default_library_id_to_event_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb +6 -0
- data/spec/dummy/db/migrate/20140810061942_add_user_id_to_user_checkout_stat.rb +12 -0
- data/spec/dummy/db/migrate/20140810091231_add_checkout_icalendar_token_to_profile.rb +6 -0
- data/spec/dummy/db/migrate/20140810091417_add_save_checkout_history_to_profile.rb +5 -0
- data/spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb +5 -0
- data/spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb +5 -0
- data/spec/dummy/db/schema.rb +660 -87
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/fixtures/profiles.yml +98 -0
- data/spec/fixtures/users.yml +0 -28
- data/spec/models/ndl_book_spec.rb +6 -2
- metadata +188 -34
- data/spec/dummy/db/migrate/143_create_subject_has_classifications.rb +0 -16
- data/spec/dummy/db/migrate/20080606052544_create_work_has_subjects.rb +0 -18
- data/spec/dummy/db/migrate/20090208044541_create_subject_heading_type_has_subjects.rb +0 -16
- data/spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb +0 -9
- data/spec/dummy/db/migrate/20110618091240_add_periodical_to_series_statement.rb +0 -9
- data/spec/dummy/db/migrate/20110820131417_create_series_has_manifestations.rb +0 -13
- data/spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb +0 -13
- data/spec/dummy/db/migrate/20111009183423_add_ndc_to_manifestation.rb +0 -9
- data/spec/dummy/db/migrate/20111201121844_create_roles.rb +0 -12
- data/spec/dummy/db/migrate/20111201155456_create_users.rb +0 -13
- data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +0 -52
- data/spec/dummy/db/migrate/20120415060308_rename_resource_import_file_imported_at_to_executed_at.rb +0 -9
@@ -0,0 +1,12 @@
|
|
1
|
+
class AddUserIdToUserCheckoutStat < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
add_column :user_checkout_stats, :user_id, :integer
|
4
|
+
add_column :user_reserve_stats, :user_id, :integer
|
5
|
+
add_column :manifestation_checkout_stats, :user_id, :integer
|
6
|
+
add_column :manifestation_reserve_stats, :user_id, :integer
|
7
|
+
add_index :user_checkout_stats, :user_id
|
8
|
+
add_index :user_reserve_stats, :user_id
|
9
|
+
add_index :manifestation_checkout_stats, :user_id
|
10
|
+
add_index :manifestation_reserve_stats, :user_id
|
11
|
+
end
|
12
|
+
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,19 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended to check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:version =>
|
14
|
+
ActiveRecord::Schema.define(:version => 20140813182425) do
|
15
|
+
|
16
|
+
create_table "agent_import_file_transitions", :force => true do |t|
|
17
|
+
t.string "to_state"
|
18
|
+
t.text "metadata", :default => "{}"
|
19
|
+
t.integer "sort_key"
|
20
|
+
t.integer "agent_import_file_id"
|
21
|
+
t.datetime "created_at", :null => false
|
22
|
+
t.datetime "updated_at", :null => false
|
23
|
+
end
|
24
|
+
|
25
|
+
add_index "agent_import_file_transitions", ["agent_import_file_id"], :name => "index_agent_import_file_transitions_on_agent_import_file_id"
|
26
|
+
add_index "agent_import_file_transitions", ["sort_key", "agent_import_file_id"], :name => "index_agent_import_file_transitions_on_sort_key_and_file_id", :unique => true
|
15
27
|
|
16
28
|
create_table "agent_import_files", :force => true do |t|
|
17
29
|
t.integer "parent_id"
|
@@ -20,7 +32,6 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
20
32
|
t.integer "user_id"
|
21
33
|
t.text "note"
|
22
34
|
t.datetime "executed_at"
|
23
|
-
t.string "state"
|
24
35
|
t.string "agent_import_file_name"
|
25
36
|
t.string "agent_import_content_type"
|
26
37
|
t.integer "agent_import_file_size"
|
@@ -30,10 +41,10 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
30
41
|
t.string "agent_import_fingerprint"
|
31
42
|
t.text "error_message"
|
32
43
|
t.string "edit_mode"
|
44
|
+
t.string "user_encoding"
|
33
45
|
end
|
34
46
|
|
35
47
|
add_index "agent_import_files", ["parent_id"], :name => "index_agent_import_files_on_parent_id"
|
36
|
-
add_index "agent_import_files", ["state"], :name => "index_agent_import_files_on_state"
|
37
48
|
add_index "agent_import_files", ["user_id"], :name => "index_agent_import_files_on_user_id"
|
38
49
|
|
39
50
|
create_table "agent_import_results", :force => true do |t|
|
@@ -76,7 +87,6 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
76
87
|
end
|
77
88
|
|
78
89
|
create_table "agents", :force => true do |t|
|
79
|
-
t.integer "user_id"
|
80
90
|
t.string "last_name"
|
81
91
|
t.string "middle_name"
|
82
92
|
t.string "first_name"
|
@@ -116,7 +126,6 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
116
126
|
t.text "note"
|
117
127
|
t.integer "required_role_id", :default => 1, :null => false
|
118
128
|
t.integer "required_score", :default => 0, :null => false
|
119
|
-
t.string "state"
|
120
129
|
t.text "email"
|
121
130
|
t.text "url"
|
122
131
|
t.text "full_name_alternative_transcription"
|
@@ -130,7 +139,18 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
130
139
|
add_index "agents", ["full_name"], :name => "index_agents_on_full_name"
|
131
140
|
add_index "agents", ["language_id"], :name => "index_agents_on_language_id"
|
132
141
|
add_index "agents", ["required_role_id"], :name => "index_agents_on_required_role_id"
|
133
|
-
|
142
|
+
|
143
|
+
create_table "carrier_type_has_checkout_types", :force => true do |t|
|
144
|
+
t.integer "carrier_type_id", :null => false
|
145
|
+
t.integer "checkout_type_id", :null => false
|
146
|
+
t.text "note"
|
147
|
+
t.integer "position"
|
148
|
+
t.datetime "created_at", :null => false
|
149
|
+
t.datetime "updated_at", :null => false
|
150
|
+
end
|
151
|
+
|
152
|
+
add_index "carrier_type_has_checkout_types", ["carrier_type_id"], :name => "index_carrier_type_has_checkout_types_on_m_form_id"
|
153
|
+
add_index "carrier_type_has_checkout_types", ["checkout_type_id"], :name => "index_carrier_type_has_checkout_types_on_checkout_type_id"
|
134
154
|
|
135
155
|
create_table "carrier_types", :force => true do |t|
|
136
156
|
t.string "name", :null => false
|
@@ -141,6 +161,93 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
141
161
|
t.datetime "updated_at", :null => false
|
142
162
|
end
|
143
163
|
|
164
|
+
create_table "checked_items", :force => true do |t|
|
165
|
+
t.integer "item_id", :null => false
|
166
|
+
t.integer "basket_id", :null => false
|
167
|
+
t.datetime "due_date", :null => false
|
168
|
+
t.datetime "created_at", :null => false
|
169
|
+
t.datetime "updated_at", :null => false
|
170
|
+
t.integer "librarian_id"
|
171
|
+
end
|
172
|
+
|
173
|
+
add_index "checked_items", ["basket_id"], :name => "index_checked_items_on_basket_id"
|
174
|
+
add_index "checked_items", ["item_id"], :name => "index_checked_items_on_item_id"
|
175
|
+
|
176
|
+
create_table "checkins", :force => true do |t|
|
177
|
+
t.integer "item_id", :null => false
|
178
|
+
t.integer "librarian_id"
|
179
|
+
t.integer "basket_id"
|
180
|
+
t.datetime "created_at", :null => false
|
181
|
+
t.datetime "updated_at", :null => false
|
182
|
+
t.integer "lock_version", :default => 0, :null => false
|
183
|
+
end
|
184
|
+
|
185
|
+
add_index "checkins", ["basket_id"], :name => "index_checkins_on_basket_id"
|
186
|
+
add_index "checkins", ["item_id"], :name => "index_checkins_on_item_id"
|
187
|
+
add_index "checkins", ["librarian_id"], :name => "index_checkins_on_librarian_id"
|
188
|
+
|
189
|
+
create_table "checkout_stat_has_manifestations", :force => true do |t|
|
190
|
+
t.integer "manifestation_checkout_stat_id", :null => false
|
191
|
+
t.integer "manifestation_id", :null => false
|
192
|
+
t.integer "checkouts_count"
|
193
|
+
t.datetime "created_at", :null => false
|
194
|
+
t.datetime "updated_at", :null => false
|
195
|
+
end
|
196
|
+
|
197
|
+
add_index "checkout_stat_has_manifestations", ["manifestation_checkout_stat_id"], :name => "index_checkout_stat_has_manifestations_on_checkout_stat_id"
|
198
|
+
add_index "checkout_stat_has_manifestations", ["manifestation_id"], :name => "index_checkout_stat_has_manifestations_on_manifestation_id"
|
199
|
+
|
200
|
+
create_table "checkout_stat_has_users", :force => true do |t|
|
201
|
+
t.integer "user_checkout_stat_id", :null => false
|
202
|
+
t.integer "user_id", :null => false
|
203
|
+
t.integer "checkouts_count", :default => 0, :null => false
|
204
|
+
t.datetime "created_at", :null => false
|
205
|
+
t.datetime "updated_at", :null => false
|
206
|
+
end
|
207
|
+
|
208
|
+
add_index "checkout_stat_has_users", ["user_checkout_stat_id"], :name => "index_checkout_stat_has_users_on_user_checkout_stat_id"
|
209
|
+
add_index "checkout_stat_has_users", ["user_id"], :name => "index_checkout_stat_has_users_on_user_id"
|
210
|
+
|
211
|
+
create_table "checkout_types", :force => true do |t|
|
212
|
+
t.string "name", :null => false
|
213
|
+
t.text "display_name"
|
214
|
+
t.text "note"
|
215
|
+
t.integer "position"
|
216
|
+
t.datetime "created_at", :null => false
|
217
|
+
t.datetime "updated_at", :null => false
|
218
|
+
end
|
219
|
+
|
220
|
+
add_index "checkout_types", ["name"], :name => "index_checkout_types_on_name"
|
221
|
+
|
222
|
+
create_table "checkouts", :force => true do |t|
|
223
|
+
t.integer "user_id"
|
224
|
+
t.integer "item_id", :null => false
|
225
|
+
t.integer "checkin_id"
|
226
|
+
t.integer "librarian_id"
|
227
|
+
t.integer "basket_id"
|
228
|
+
t.datetime "due_date"
|
229
|
+
t.integer "checkout_renewal_count", :default => 0, :null => false
|
230
|
+
t.integer "lock_version", :default => 0, :null => false
|
231
|
+
t.datetime "created_at", :null => false
|
232
|
+
t.datetime "updated_at", :null => false
|
233
|
+
end
|
234
|
+
|
235
|
+
add_index "checkouts", ["basket_id"], :name => "index_checkouts_on_basket_id"
|
236
|
+
add_index "checkouts", ["checkin_id"], :name => "index_checkouts_on_checkin_id"
|
237
|
+
add_index "checkouts", ["item_id", "basket_id"], :name => "index_checkouts_on_item_id_and_basket_id", :unique => true
|
238
|
+
add_index "checkouts", ["item_id"], :name => "index_checkouts_on_item_id"
|
239
|
+
add_index "checkouts", ["librarian_id"], :name => "index_checkouts_on_librarian_id"
|
240
|
+
add_index "checkouts", ["user_id"], :name => "index_checkouts_on_user_id"
|
241
|
+
|
242
|
+
create_table "circulation_statuses", :force => true do |t|
|
243
|
+
t.string "name", :null => false
|
244
|
+
t.text "display_name"
|
245
|
+
t.text "note"
|
246
|
+
t.integer "position"
|
247
|
+
t.datetime "created_at", :null => false
|
248
|
+
t.datetime "updated_at", :null => false
|
249
|
+
end
|
250
|
+
|
144
251
|
create_table "classification_types", :force => true do |t|
|
145
252
|
t.string "name", :null => false
|
146
253
|
t.text "display_name"
|
@@ -222,6 +329,75 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
222
329
|
add_index "donates", ["agent_id"], :name => "index_donates_on_agent_id"
|
223
330
|
add_index "donates", ["item_id"], :name => "index_donates_on_item_id"
|
224
331
|
|
332
|
+
create_table "event_categories", :force => true do |t|
|
333
|
+
t.string "name", :null => false
|
334
|
+
t.text "display_name"
|
335
|
+
t.text "note"
|
336
|
+
t.integer "position"
|
337
|
+
t.datetime "created_at", :null => false
|
338
|
+
t.datetime "updated_at", :null => false
|
339
|
+
end
|
340
|
+
|
341
|
+
create_table "event_import_file_transitions", :force => true do |t|
|
342
|
+
t.string "to_state"
|
343
|
+
t.text "metadata", :default => "{}"
|
344
|
+
t.integer "sort_key"
|
345
|
+
t.integer "event_import_file_id"
|
346
|
+
t.datetime "created_at", :null => false
|
347
|
+
t.datetime "updated_at", :null => false
|
348
|
+
end
|
349
|
+
|
350
|
+
add_index "event_import_file_transitions", ["event_import_file_id"], :name => "index_event_import_file_transitions_on_event_import_file_id"
|
351
|
+
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
|
352
|
+
|
353
|
+
create_table "event_import_files", :force => true do |t|
|
354
|
+
t.integer "parent_id"
|
355
|
+
t.string "content_type"
|
356
|
+
t.integer "size"
|
357
|
+
t.integer "user_id"
|
358
|
+
t.text "note"
|
359
|
+
t.datetime "executed_at"
|
360
|
+
t.string "event_import_file_name"
|
361
|
+
t.string "event_import_content_type"
|
362
|
+
t.integer "event_import_file_size"
|
363
|
+
t.datetime "event_import_updated_at"
|
364
|
+
t.string "edit_mode"
|
365
|
+
t.datetime "created_at", :null => false
|
366
|
+
t.datetime "updated_at", :null => false
|
367
|
+
t.string "event_import_fingerprint"
|
368
|
+
t.text "error_message"
|
369
|
+
t.string "user_encoding"
|
370
|
+
t.integer "default_library_id"
|
371
|
+
end
|
372
|
+
|
373
|
+
add_index "event_import_files", ["parent_id"], :name => "index_event_import_files_on_parent_id"
|
374
|
+
add_index "event_import_files", ["user_id"], :name => "index_event_import_files_on_user_id"
|
375
|
+
|
376
|
+
create_table "event_import_results", :force => true do |t|
|
377
|
+
t.integer "event_import_file_id"
|
378
|
+
t.integer "event_id"
|
379
|
+
t.text "body"
|
380
|
+
t.datetime "created_at", :null => false
|
381
|
+
t.datetime "updated_at", :null => false
|
382
|
+
end
|
383
|
+
|
384
|
+
create_table "events", :force => true do |t|
|
385
|
+
t.integer "library_id", :default => 1, :null => false
|
386
|
+
t.integer "event_category_id", :default => 1, :null => false
|
387
|
+
t.string "name"
|
388
|
+
t.text "note"
|
389
|
+
t.datetime "start_at"
|
390
|
+
t.datetime "end_at"
|
391
|
+
t.boolean "all_day", :default => false, :null => false
|
392
|
+
t.datetime "deleted_at"
|
393
|
+
t.text "display_name"
|
394
|
+
t.datetime "created_at", :null => false
|
395
|
+
t.datetime "updated_at", :null => false
|
396
|
+
end
|
397
|
+
|
398
|
+
add_index "events", ["event_category_id"], :name => "index_events_on_event_category_id"
|
399
|
+
add_index "events", ["library_id"], :name => "index_events_on_library_id"
|
400
|
+
|
225
401
|
create_table "exemplifies", :force => true do |t|
|
226
402
|
t.integer "manifestation_id", :null => false
|
227
403
|
t.integer "item_id", :null => false
|
@@ -282,9 +458,20 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
282
458
|
add_index "identifiers", ["body", "identifier_type_id"], :name => "index_identifiers_on_body_and_identifier_type_id"
|
283
459
|
add_index "identifiers", ["manifestation_id"], :name => "index_identifiers_on_manifestation_id"
|
284
460
|
|
461
|
+
create_table "import_request_transitions", :force => true do |t|
|
462
|
+
t.string "to_state"
|
463
|
+
t.text "metadata", :default => "{}"
|
464
|
+
t.integer "sort_key"
|
465
|
+
t.integer "import_request_id"
|
466
|
+
t.datetime "created_at", :null => false
|
467
|
+
t.datetime "updated_at", :null => false
|
468
|
+
end
|
469
|
+
|
470
|
+
add_index "import_request_transitions", ["import_request_id"], :name => "index_import_request_transitions_on_import_request_id"
|
471
|
+
add_index "import_request_transitions", ["sort_key", "import_request_id"], :name => "index_import_request_transitions_on_sort_key_and_request_id", :unique => true
|
472
|
+
|
285
473
|
create_table "import_requests", :force => true do |t|
|
286
474
|
t.string "isbn"
|
287
|
-
t.string "state"
|
288
475
|
t.integer "manifestation_id"
|
289
476
|
t.integer "user_id"
|
290
477
|
t.datetime "created_at", :null => false
|
@@ -295,28 +482,47 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
295
482
|
add_index "import_requests", ["manifestation_id"], :name => "index_import_requests_on_manifestation_id"
|
296
483
|
add_index "import_requests", ["user_id"], :name => "index_import_requests_on_user_id"
|
297
484
|
|
485
|
+
create_table "item_has_use_restrictions", :force => true do |t|
|
486
|
+
t.integer "item_id", :null => false
|
487
|
+
t.integer "use_restriction_id", :null => false
|
488
|
+
t.datetime "created_at", :null => false
|
489
|
+
t.datetime "updated_at", :null => false
|
490
|
+
end
|
491
|
+
|
492
|
+
add_index "item_has_use_restrictions", ["item_id"], :name => "index_item_has_use_restrictions_on_item_id"
|
493
|
+
add_index "item_has_use_restrictions", ["use_restriction_id"], :name => "index_item_has_use_restrictions_on_use_restriction_id"
|
494
|
+
|
298
495
|
create_table "items", :force => true do |t|
|
299
496
|
t.string "call_number"
|
300
497
|
t.string "item_identifier"
|
301
|
-
t.datetime "created_at",
|
302
|
-
t.datetime "updated_at",
|
498
|
+
t.datetime "created_at", :null => false
|
499
|
+
t.datetime "updated_at", :null => false
|
303
500
|
t.datetime "deleted_at"
|
304
|
-
t.integer "shelf_id",
|
305
|
-
t.boolean "include_supplements",
|
501
|
+
t.integer "shelf_id", :default => 1, :null => false
|
502
|
+
t.boolean "include_supplements", :default => false, :null => false
|
306
503
|
t.text "note"
|
307
504
|
t.string "url"
|
308
505
|
t.integer "price"
|
309
|
-
t.integer "lock_version",
|
310
|
-
t.integer "required_role_id",
|
311
|
-
t.
|
312
|
-
t.integer "required_score", :default => 0, :null => false
|
506
|
+
t.integer "lock_version", :default => 0, :null => false
|
507
|
+
t.integer "required_role_id", :default => 1, :null => false
|
508
|
+
t.integer "required_score", :default => 0, :null => false
|
313
509
|
t.datetime "acquired_at"
|
314
510
|
t.integer "bookstore_id"
|
315
511
|
t.integer "budget_type_id"
|
512
|
+
t.integer "circulation_status_id", :default => 5, :null => false
|
513
|
+
t.integer "checkout_type_id", :default => 1, :null => false
|
514
|
+
t.string "binding_item_identifier"
|
515
|
+
t.string "binding_call_number"
|
516
|
+
t.datetime "binded_at"
|
517
|
+
t.integer "manifestation_id"
|
316
518
|
end
|
317
519
|
|
520
|
+
add_index "items", ["binding_item_identifier"], :name => "index_items_on_binding_item_identifier"
|
318
521
|
add_index "items", ["bookstore_id"], :name => "index_items_on_bookstore_id"
|
522
|
+
add_index "items", ["checkout_type_id"], :name => "index_items_on_checkout_type_id"
|
523
|
+
add_index "items", ["circulation_status_id"], :name => "index_items_on_circulation_status_id"
|
319
524
|
add_index "items", ["item_identifier"], :name => "index_items_on_item_identifier"
|
525
|
+
add_index "items", ["manifestation_id"], :name => "index_items_on_manifestation_id"
|
320
526
|
add_index "items", ["required_role_id"], :name => "index_items_on_required_role_id"
|
321
527
|
add_index "items", ["shelf_id"], :name => "index_items_on_shelf_id"
|
322
528
|
|
@@ -336,6 +542,21 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
336
542
|
add_index "languages", ["iso_639_3"], :name => "index_languages_on_iso_639_3"
|
337
543
|
add_index "languages", ["name"], :name => "index_languages_on_name", :unique => true
|
338
544
|
|
545
|
+
create_table "lending_policies", :force => true do |t|
|
546
|
+
t.integer "item_id", :null => false
|
547
|
+
t.integer "user_group_id", :null => false
|
548
|
+
t.integer "loan_period", :default => 0, :null => false
|
549
|
+
t.datetime "fixed_due_date"
|
550
|
+
t.integer "renewal", :default => 0, :null => false
|
551
|
+
t.integer "fine", :default => 0, :null => false
|
552
|
+
t.text "note"
|
553
|
+
t.integer "position"
|
554
|
+
t.datetime "created_at", :null => false
|
555
|
+
t.datetime "updated_at", :null => false
|
556
|
+
end
|
557
|
+
|
558
|
+
add_index "lending_policies", ["item_id", "user_group_id"], :name => "index_lending_policies_on_item_id_and_user_group_id", :unique => true
|
559
|
+
|
339
560
|
create_table "licenses", :force => true do |t|
|
340
561
|
t.string "name", :null => false
|
341
562
|
t.string "display_name"
|
@@ -345,6 +566,31 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
345
566
|
t.datetime "updated_at", :null => false
|
346
567
|
end
|
347
568
|
|
569
|
+
create_table "manifestation_checkout_stat_transitions", :force => true do |t|
|
570
|
+
t.string "to_state"
|
571
|
+
t.text "metadata", :default => "{}"
|
572
|
+
t.integer "sort_key"
|
573
|
+
t.integer "manifestation_checkout_stat_id"
|
574
|
+
t.datetime "created_at", :null => false
|
575
|
+
t.datetime "updated_at", :null => false
|
576
|
+
end
|
577
|
+
|
578
|
+
add_index "manifestation_checkout_stat_transitions", ["manifestation_checkout_stat_id"], :name => "index_manifestation_checkout_stat_transitions_on_stat_id"
|
579
|
+
add_index "manifestation_checkout_stat_transitions", ["sort_key", "manifestation_checkout_stat_id"], :name => "index_manifestation_checkout_stat_transitions_on_transition", :unique => true
|
580
|
+
|
581
|
+
create_table "manifestation_checkout_stats", :force => true do |t|
|
582
|
+
t.datetime "start_date"
|
583
|
+
t.datetime "end_date"
|
584
|
+
t.text "note"
|
585
|
+
t.datetime "created_at", :null => false
|
586
|
+
t.datetime "updated_at", :null => false
|
587
|
+
t.datetime "started_at"
|
588
|
+
t.datetime "completed_at"
|
589
|
+
t.integer "user_id"
|
590
|
+
end
|
591
|
+
|
592
|
+
add_index "manifestation_checkout_stats", ["user_id"], :name => "index_manifestation_checkout_stats_on_user_id"
|
593
|
+
|
348
594
|
create_table "manifestation_relationship_types", :force => true do |t|
|
349
595
|
t.string "name", :null => false
|
350
596
|
t.text "display_name"
|
@@ -366,6 +612,31 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
366
612
|
add_index "manifestation_relationships", ["child_id"], :name => "index_manifestation_relationships_on_child_id"
|
367
613
|
add_index "manifestation_relationships", ["parent_id"], :name => "index_manifestation_relationships_on_parent_id"
|
368
614
|
|
615
|
+
create_table "manifestation_reserve_stat_transitions", :force => true do |t|
|
616
|
+
t.string "to_state"
|
617
|
+
t.text "metadata", :default => "{}"
|
618
|
+
t.integer "sort_key"
|
619
|
+
t.integer "manifestation_reserve_stat_id"
|
620
|
+
t.datetime "created_at", :null => false
|
621
|
+
t.datetime "updated_at", :null => false
|
622
|
+
end
|
623
|
+
|
624
|
+
add_index "manifestation_reserve_stat_transitions", ["manifestation_reserve_stat_id"], :name => "index_manifestation_reserve_stat_transitions_on_stat_id"
|
625
|
+
add_index "manifestation_reserve_stat_transitions", ["sort_key", "manifestation_reserve_stat_id"], :name => "index_manifestation_reserve_stat_transitions_on_transition", :unique => true
|
626
|
+
|
627
|
+
create_table "manifestation_reserve_stats", :force => true do |t|
|
628
|
+
t.datetime "start_date"
|
629
|
+
t.datetime "end_date"
|
630
|
+
t.text "note"
|
631
|
+
t.datetime "created_at", :null => false
|
632
|
+
t.datetime "updated_at", :null => false
|
633
|
+
t.datetime "started_at"
|
634
|
+
t.datetime "completed_at"
|
635
|
+
t.integer "user_id"
|
636
|
+
end
|
637
|
+
|
638
|
+
add_index "manifestation_reserve_stats", ["user_id"], :name => "index_manifestation_reserve_stats_on_user_id"
|
639
|
+
|
369
640
|
create_table "manifestations", :force => true do |t|
|
370
641
|
t.text "original_title", :null => false
|
371
642
|
t.text "title_alternative"
|
@@ -396,7 +667,6 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
396
667
|
t.boolean "repository_content", :default => false, :null => false
|
397
668
|
t.integer "lock_version", :default => 0, :null => false
|
398
669
|
t.integer "required_role_id", :default => 1, :null => false
|
399
|
-
t.string "state"
|
400
670
|
t.integer "required_score", :default => 0, :null => false
|
401
671
|
t.integer "frequency_id", :default => 1, :null => false
|
402
672
|
t.boolean "subscription_master", :default => false, :null => false
|
@@ -417,22 +687,21 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
417
687
|
t.integer "volume_number"
|
418
688
|
t.integer "issue_number"
|
419
689
|
t.integer "serial_number"
|
420
|
-
t.string "ndc"
|
421
690
|
t.integer "content_type_id", :default => 1
|
422
691
|
t.integer "year_of_publication"
|
423
692
|
t.text "attachment_meta"
|
424
693
|
t.integer "month_of_publication"
|
694
|
+
t.boolean "fulltext_content"
|
425
695
|
t.string "doi"
|
426
696
|
t.boolean "periodical"
|
427
697
|
t.text "statement_of_responsibility"
|
698
|
+
t.text "publication_place"
|
428
699
|
end
|
429
700
|
|
430
701
|
add_index "manifestations", ["access_address"], :name => "index_manifestations_on_access_address"
|
431
|
-
add_index "manifestations", ["
|
702
|
+
add_index "manifestations", ["date_of_publication"], :name => "index_manifestations_on_date_of_publication"
|
432
703
|
add_index "manifestations", ["doi"], :name => "index_manifestations_on_doi"
|
433
|
-
add_index "manifestations", ["frequency_id"], :name => "index_manifestations_on_frequency_id"
|
434
704
|
add_index "manifestations", ["manifestation_identifier"], :name => "index_manifestations_on_manifestation_identifier"
|
435
|
-
add_index "manifestations", ["required_role_id"], :name => "index_manifestations_on_required_role_id"
|
436
705
|
add_index "manifestations", ["updated_at"], :name => "index_manifestations_on_updated_at"
|
437
706
|
|
438
707
|
create_table "medium_of_performances", :force => true do |t|
|
@@ -444,6 +713,73 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
444
713
|
t.datetime "updated_at", :null => false
|
445
714
|
end
|
446
715
|
|
716
|
+
create_table "message_request_transitions", :force => true do |t|
|
717
|
+
t.string "to_state"
|
718
|
+
t.text "metadata", :default => "{}"
|
719
|
+
t.integer "sort_key"
|
720
|
+
t.integer "message_request_id"
|
721
|
+
t.datetime "created_at", :null => false
|
722
|
+
t.datetime "updated_at", :null => false
|
723
|
+
end
|
724
|
+
|
725
|
+
add_index "message_request_transitions", ["message_request_id"], :name => "index_message_request_transitions_on_message_request_id"
|
726
|
+
add_index "message_request_transitions", ["sort_key", "message_request_id"], :name => "index_message_request_transitions_on_sort_key_and_request_id", :unique => true
|
727
|
+
|
728
|
+
create_table "message_requests", :force => true do |t|
|
729
|
+
t.integer "sender_id"
|
730
|
+
t.integer "receiver_id"
|
731
|
+
t.integer "message_template_id"
|
732
|
+
t.datetime "sent_at"
|
733
|
+
t.datetime "deleted_at"
|
734
|
+
t.text "body"
|
735
|
+
t.datetime "created_at", :null => false
|
736
|
+
t.datetime "updated_at", :null => false
|
737
|
+
end
|
738
|
+
|
739
|
+
create_table "message_templates", :force => true do |t|
|
740
|
+
t.string "status", :null => false
|
741
|
+
t.text "title", :null => false
|
742
|
+
t.text "body", :null => false
|
743
|
+
t.integer "position"
|
744
|
+
t.string "locale", :default => "en"
|
745
|
+
t.datetime "created_at", :null => false
|
746
|
+
t.datetime "updated_at", :null => false
|
747
|
+
end
|
748
|
+
|
749
|
+
add_index "message_templates", ["status"], :name => "index_message_templates_on_status", :unique => true
|
750
|
+
|
751
|
+
create_table "message_transitions", :force => true do |t|
|
752
|
+
t.string "to_state"
|
753
|
+
t.text "metadata", :default => "{}"
|
754
|
+
t.integer "sort_key"
|
755
|
+
t.integer "message_id"
|
756
|
+
t.datetime "created_at", :null => false
|
757
|
+
t.datetime "updated_at", :null => false
|
758
|
+
end
|
759
|
+
|
760
|
+
add_index "message_transitions", ["message_id"], :name => "index_message_transitions_on_message_id"
|
761
|
+
add_index "message_transitions", ["sort_key", "message_id"], :name => "index_message_transitions_on_sort_key_and_message_id", :unique => true
|
762
|
+
|
763
|
+
create_table "messages", :force => true do |t|
|
764
|
+
t.datetime "read_at"
|
765
|
+
t.integer "receiver_id"
|
766
|
+
t.integer "sender_id"
|
767
|
+
t.string "subject", :null => false
|
768
|
+
t.text "body"
|
769
|
+
t.integer "message_request_id"
|
770
|
+
t.integer "parent_id"
|
771
|
+
t.datetime "created_at", :null => false
|
772
|
+
t.datetime "updated_at", :null => false
|
773
|
+
t.integer "lft"
|
774
|
+
t.integer "rgt"
|
775
|
+
t.integer "depth"
|
776
|
+
end
|
777
|
+
|
778
|
+
add_index "messages", ["message_request_id"], :name => "index_messages_on_message_request_id"
|
779
|
+
add_index "messages", ["parent_id"], :name => "index_messages_on_parent_id"
|
780
|
+
add_index "messages", ["receiver_id"], :name => "index_messages_on_receiver_id"
|
781
|
+
add_index "messages", ["sender_id"], :name => "index_messages_on_sender_id"
|
782
|
+
|
447
783
|
create_table "owns", :force => true do |t|
|
448
784
|
t.integer "agent_id", :null => false
|
449
785
|
t.integer "item_id", :null => false
|
@@ -455,6 +791,17 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
455
791
|
add_index "owns", ["agent_id"], :name => "index_owns_on_agent_id"
|
456
792
|
add_index "owns", ["item_id"], :name => "index_owns_on_item_id"
|
457
793
|
|
794
|
+
create_table "participates", :force => true do |t|
|
795
|
+
t.integer "agent_id", :null => false
|
796
|
+
t.integer "event_id", :null => false
|
797
|
+
t.integer "position"
|
798
|
+
t.datetime "created_at", :null => false
|
799
|
+
t.datetime "updated_at", :null => false
|
800
|
+
end
|
801
|
+
|
802
|
+
add_index "participates", ["agent_id"], :name => "index_participates_on_agent_id"
|
803
|
+
add_index "participates", ["event_id"], :name => "index_participates_on_event_id"
|
804
|
+
|
458
805
|
create_table "picture_files", :force => true do |t|
|
459
806
|
t.integer "picture_attachable_id"
|
460
807
|
t.string "picture_attachable_type"
|
@@ -495,6 +842,27 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
495
842
|
add_index "produces", ["agent_id"], :name => "index_produces_on_agent_id"
|
496
843
|
add_index "produces", ["manifestation_id"], :name => "index_produces_on_manifestation_id"
|
497
844
|
|
845
|
+
create_table "profiles", :force => true do |t|
|
846
|
+
t.integer "user_id"
|
847
|
+
t.integer "user_group_id"
|
848
|
+
t.integer "library_id"
|
849
|
+
t.string "locale"
|
850
|
+
t.string "user_number"
|
851
|
+
t.text "full_name"
|
852
|
+
t.text "note"
|
853
|
+
t.text "keyword_list"
|
854
|
+
t.integer "required_role_id"
|
855
|
+
t.datetime "created_at", :null => false
|
856
|
+
t.datetime "updated_at", :null => false
|
857
|
+
t.string "checkout_icalendar_token"
|
858
|
+
t.boolean "save_checkout_history", :default => false, :null => false
|
859
|
+
t.datetime "expired_at"
|
860
|
+
end
|
861
|
+
|
862
|
+
add_index "profiles", ["checkout_icalendar_token"], :name => "index_profiles_on_checkout_icalendar_token", :unique => true
|
863
|
+
add_index "profiles", ["user_id"], :name => "index_profiles_on_user_id"
|
864
|
+
add_index "profiles", ["user_number"], :name => "index_profiles_on_user_number", :unique => true
|
865
|
+
|
498
866
|
create_table "realize_types", :force => true do |t|
|
499
867
|
t.string "name"
|
500
868
|
t.text "display_name"
|
@@ -516,6 +884,100 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
516
884
|
add_index "realizes", ["agent_id"], :name => "index_realizes_on_agent_id"
|
517
885
|
add_index "realizes", ["expression_id"], :name => "index_realizes_on_expression_id"
|
518
886
|
|
887
|
+
create_table "reserve_stat_has_manifestations", :force => true do |t|
|
888
|
+
t.integer "manifestation_reserve_stat_id", :null => false
|
889
|
+
t.integer "manifestation_id", :null => false
|
890
|
+
t.integer "reserves_count"
|
891
|
+
t.datetime "created_at", :null => false
|
892
|
+
t.datetime "updated_at", :null => false
|
893
|
+
end
|
894
|
+
|
895
|
+
add_index "reserve_stat_has_manifestations", ["manifestation_id"], :name => "index_reserve_stat_has_manifestations_on_manifestation_id"
|
896
|
+
add_index "reserve_stat_has_manifestations", ["manifestation_reserve_stat_id"], :name => "index_reserve_stat_has_manifestations_on_m_reserve_stat_id"
|
897
|
+
|
898
|
+
create_table "reserve_stat_has_users", :force => true do |t|
|
899
|
+
t.integer "user_reserve_stat_id", :null => false
|
900
|
+
t.integer "user_id", :null => false
|
901
|
+
t.integer "reserves_count"
|
902
|
+
t.datetime "created_at", :null => false
|
903
|
+
t.datetime "updated_at", :null => false
|
904
|
+
end
|
905
|
+
|
906
|
+
add_index "reserve_stat_has_users", ["user_id"], :name => "index_reserve_stat_has_users_on_user_id"
|
907
|
+
add_index "reserve_stat_has_users", ["user_reserve_stat_id"], :name => "index_reserve_stat_has_users_on_user_reserve_stat_id"
|
908
|
+
|
909
|
+
create_table "reserve_transitions", :force => true do |t|
|
910
|
+
t.string "to_state"
|
911
|
+
t.text "metadata", :default => "{}"
|
912
|
+
t.integer "sort_key"
|
913
|
+
t.integer "reserve_id"
|
914
|
+
t.datetime "created_at", :null => false
|
915
|
+
t.datetime "updated_at", :null => false
|
916
|
+
end
|
917
|
+
|
918
|
+
add_index "reserve_transitions", ["reserve_id"], :name => "index_reserve_transitions_on_reserve_id"
|
919
|
+
add_index "reserve_transitions", ["sort_key", "reserve_id"], :name => "index_reserve_transitions_on_sort_key_and_reserve_id", :unique => true
|
920
|
+
|
921
|
+
create_table "reserves", :force => true do |t|
|
922
|
+
t.integer "user_id", :null => false
|
923
|
+
t.integer "manifestation_id", :null => false
|
924
|
+
t.integer "item_id"
|
925
|
+
t.integer "request_status_type_id", :null => false
|
926
|
+
t.datetime "checked_out_at"
|
927
|
+
t.datetime "created_at", :null => false
|
928
|
+
t.datetime "updated_at", :null => false
|
929
|
+
t.datetime "canceled_at"
|
930
|
+
t.datetime "expired_at"
|
931
|
+
t.datetime "deleted_at"
|
932
|
+
t.string "state"
|
933
|
+
t.boolean "expiration_notice_to_patron", :default => false
|
934
|
+
t.boolean "expiration_notice_to_library", :default => false
|
935
|
+
t.datetime "retained_at"
|
936
|
+
t.datetime "postponed_at"
|
937
|
+
t.integer "lock_version", :default => 0, :null => false
|
938
|
+
end
|
939
|
+
|
940
|
+
add_index "reserves", ["item_id"], :name => "index_reserves_on_item_id"
|
941
|
+
add_index "reserves", ["manifestation_id"], :name => "index_reserves_on_manifestation_id"
|
942
|
+
add_index "reserves", ["request_status_type_id"], :name => "index_reserves_on_request_status_type_id"
|
943
|
+
add_index "reserves", ["state"], :name => "index_reserves_on_state"
|
944
|
+
add_index "reserves", ["user_id"], :name => "index_reserves_on_user_id"
|
945
|
+
|
946
|
+
create_table "resource_export_file_transitions", :force => true do |t|
|
947
|
+
t.string "to_state"
|
948
|
+
t.text "metadata", :default => "{}"
|
949
|
+
t.integer "sort_key"
|
950
|
+
t.integer "resource_export_file_id"
|
951
|
+
t.datetime "created_at", :null => false
|
952
|
+
t.datetime "updated_at", :null => false
|
953
|
+
end
|
954
|
+
|
955
|
+
add_index "resource_export_file_transitions", ["resource_export_file_id"], :name => "index_resource_export_file_transitions_on_file_id"
|
956
|
+
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
|
957
|
+
|
958
|
+
create_table "resource_export_files", :force => true do |t|
|
959
|
+
t.integer "user_id"
|
960
|
+
t.string "resource_export_file_name"
|
961
|
+
t.string "resource_export_content_type"
|
962
|
+
t.integer "resource_export_file_size"
|
963
|
+
t.datetime "resource_export_updated_at"
|
964
|
+
t.datetime "executed_at"
|
965
|
+
t.datetime "created_at", :null => false
|
966
|
+
t.datetime "updated_at", :null => false
|
967
|
+
end
|
968
|
+
|
969
|
+
create_table "resource_import_file_transitions", :force => true do |t|
|
970
|
+
t.string "to_state"
|
971
|
+
t.text "metadata", :default => "{}"
|
972
|
+
t.integer "sort_key"
|
973
|
+
t.integer "resource_import_file_id"
|
974
|
+
t.datetime "created_at", :null => false
|
975
|
+
t.datetime "updated_at", :null => false
|
976
|
+
end
|
977
|
+
|
978
|
+
add_index "resource_import_file_transitions", ["resource_import_file_id"], :name => "index_resource_import_file_transitions_on_file_id"
|
979
|
+
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
|
980
|
+
|
519
981
|
create_table "resource_import_files", :force => true do |t|
|
520
982
|
t.integer "parent_id"
|
521
983
|
t.string "content_type"
|
@@ -523,7 +985,6 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
523
985
|
t.integer "user_id"
|
524
986
|
t.text "note"
|
525
987
|
t.datetime "executed_at"
|
526
|
-
t.string "state"
|
527
988
|
t.string "resource_import_file_name"
|
528
989
|
t.string "resource_import_content_type"
|
529
990
|
t.integer "resource_import_file_size"
|
@@ -533,10 +994,11 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
533
994
|
t.string "edit_mode"
|
534
995
|
t.string "resource_import_fingerprint"
|
535
996
|
t.text "error_message"
|
997
|
+
t.string "user_encoding"
|
998
|
+
t.integer "default_shelf_id"
|
536
999
|
end
|
537
1000
|
|
538
1001
|
add_index "resource_import_files", ["parent_id"], :name => "index_resource_import_files_on_parent_id"
|
539
|
-
add_index "resource_import_files", ["state"], :name => "index_resource_import_files_on_state"
|
540
1002
|
add_index "resource_import_files", ["user_id"], :name => "index_resource_import_files_on_user_id"
|
541
1003
|
|
542
1004
|
create_table "resource_import_results", :force => true do |t|
|
@@ -553,25 +1015,15 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
553
1015
|
add_index "resource_import_results", ["resource_import_file_id"], :name => "index_resource_import_results_on_resource_import_file_id"
|
554
1016
|
|
555
1017
|
create_table "roles", :force => true do |t|
|
556
|
-
t.string "name"
|
557
|
-
t.
|
1018
|
+
t.string "name", :null => false
|
1019
|
+
t.string "display_name"
|
558
1020
|
t.text "note"
|
1021
|
+
t.datetime "created_at"
|
1022
|
+
t.datetime "updated_at"
|
1023
|
+
t.integer "score", :default => 0, :null => false
|
559
1024
|
t.integer "position"
|
560
|
-
t.datetime "created_at", :null => false
|
561
|
-
t.datetime "updated_at", :null => false
|
562
|
-
end
|
563
|
-
|
564
|
-
create_table "series_has_manifestations", :force => true do |t|
|
565
|
-
t.integer "series_statement_id"
|
566
|
-
t.integer "manifestation_id"
|
567
|
-
t.integer "position"
|
568
|
-
t.datetime "created_at", :null => false
|
569
|
-
t.datetime "updated_at", :null => false
|
570
1025
|
end
|
571
1026
|
|
572
|
-
add_index "series_has_manifestations", ["manifestation_id"], :name => "index_series_has_manifestations_on_manifestation_id"
|
573
|
-
add_index "series_has_manifestations", ["series_statement_id"], :name => "index_series_has_manifestations_on_series_statement_id"
|
574
|
-
|
575
1027
|
create_table "series_statement_merge_lists", :force => true do |t|
|
576
1028
|
t.string "title"
|
577
1029
|
t.datetime "created_at", :null => false
|
@@ -599,8 +1051,6 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
599
1051
|
t.text "title_transcription"
|
600
1052
|
t.text "title_alternative"
|
601
1053
|
t.string "series_statement_identifier"
|
602
|
-
t.string "issn"
|
603
|
-
t.boolean "periodical"
|
604
1054
|
t.integer "manifestation_id"
|
605
1055
|
t.text "note"
|
606
1056
|
t.text "title_subseries_transcription"
|
@@ -615,27 +1065,6 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
615
1065
|
add_index "series_statements", ["root_manifestation_id"], :name => "index_series_statements_on_root_manifestation_id"
|
616
1066
|
add_index "series_statements", ["series_statement_identifier"], :name => "index_series_statements_on_series_statement_identifier"
|
617
1067
|
|
618
|
-
create_table "subject_has_classifications", :force => true do |t|
|
619
|
-
t.integer "subject_id"
|
620
|
-
t.string "subject_type"
|
621
|
-
t.integer "classification_id", :null => false
|
622
|
-
t.datetime "created_at", :null => false
|
623
|
-
t.datetime "updated_at", :null => false
|
624
|
-
end
|
625
|
-
|
626
|
-
add_index "subject_has_classifications", ["classification_id"], :name => "index_subject_has_classifications_on_classification_id"
|
627
|
-
add_index "subject_has_classifications", ["subject_id"], :name => "index_subject_has_classifications_on_subject_id"
|
628
|
-
|
629
|
-
create_table "subject_heading_type_has_subjects", :force => true do |t|
|
630
|
-
t.integer "subject_id", :null => false
|
631
|
-
t.string "subject_type"
|
632
|
-
t.integer "subject_heading_type_id", :null => false
|
633
|
-
t.datetime "created_at", :null => false
|
634
|
-
t.datetime "updated_at", :null => false
|
635
|
-
end
|
636
|
-
|
637
|
-
add_index "subject_heading_type_has_subjects", ["subject_id"], :name => "index_subject_heading_type_has_subjects_on_subject_id"
|
638
|
-
|
639
1068
|
create_table "subject_heading_types", :force => true do |t|
|
640
1069
|
t.string "name", :null => false
|
641
1070
|
t.text "display_name"
|
@@ -679,6 +1108,98 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
679
1108
|
add_index "subjects", ["term"], :name => "index_subjects_on_term"
|
680
1109
|
add_index "subjects", ["use_term_id"], :name => "index_subjects_on_use_term_id"
|
681
1110
|
|
1111
|
+
create_table "use_restrictions", :force => true do |t|
|
1112
|
+
t.string "name", :null => false
|
1113
|
+
t.text "display_name"
|
1114
|
+
t.text "note"
|
1115
|
+
t.integer "position"
|
1116
|
+
t.datetime "created_at", :null => false
|
1117
|
+
t.datetime "updated_at", :null => false
|
1118
|
+
end
|
1119
|
+
|
1120
|
+
create_table "user_checkout_stat_transitions", :force => true do |t|
|
1121
|
+
t.string "to_state"
|
1122
|
+
t.text "metadata", :default => "{}"
|
1123
|
+
t.integer "sort_key"
|
1124
|
+
t.integer "user_checkout_stat_id"
|
1125
|
+
t.datetime "created_at", :null => false
|
1126
|
+
t.datetime "updated_at", :null => false
|
1127
|
+
end
|
1128
|
+
|
1129
|
+
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
|
1130
|
+
add_index "user_checkout_stat_transitions", ["user_checkout_stat_id"], :name => "index_user_checkout_stat_transitions_on_user_checkout_stat_id"
|
1131
|
+
|
1132
|
+
create_table "user_checkout_stats", :force => true do |t|
|
1133
|
+
t.datetime "start_date"
|
1134
|
+
t.datetime "end_date"
|
1135
|
+
t.text "note"
|
1136
|
+
t.datetime "created_at", :null => false
|
1137
|
+
t.datetime "updated_at", :null => false
|
1138
|
+
t.datetime "started_at"
|
1139
|
+
t.datetime "completed_at"
|
1140
|
+
t.integer "user_id"
|
1141
|
+
end
|
1142
|
+
|
1143
|
+
add_index "user_checkout_stats", ["user_id"], :name => "index_user_checkout_stats_on_user_id"
|
1144
|
+
|
1145
|
+
create_table "user_export_file_transitions", :force => true do |t|
|
1146
|
+
t.string "to_state"
|
1147
|
+
t.text "metadata", :default => "{}"
|
1148
|
+
t.integer "sort_key"
|
1149
|
+
t.integer "user_export_file_id"
|
1150
|
+
t.datetime "created_at", :null => false
|
1151
|
+
t.datetime "updated_at", :null => false
|
1152
|
+
end
|
1153
|
+
|
1154
|
+
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
|
1155
|
+
add_index "user_export_file_transitions", ["user_export_file_id"], :name => "index_user_export_file_transitions_on_file_id"
|
1156
|
+
|
1157
|
+
create_table "user_export_files", :force => true do |t|
|
1158
|
+
t.integer "user_id"
|
1159
|
+
t.string "user_export_file_name"
|
1160
|
+
t.string "user_export_content_type"
|
1161
|
+
t.integer "user_export_file_size"
|
1162
|
+
t.datetime "user_export_updated_at"
|
1163
|
+
t.datetime "executed_at"
|
1164
|
+
t.datetime "created_at", :null => false
|
1165
|
+
t.datetime "updated_at", :null => false
|
1166
|
+
end
|
1167
|
+
|
1168
|
+
create_table "user_group_has_checkout_types", :force => true do |t|
|
1169
|
+
t.integer "user_group_id", :null => false
|
1170
|
+
t.integer "checkout_type_id", :null => false
|
1171
|
+
t.integer "checkout_limit", :default => 0, :null => false
|
1172
|
+
t.integer "checkout_period", :default => 0, :null => false
|
1173
|
+
t.integer "checkout_renewal_limit", :default => 0, :null => false
|
1174
|
+
t.integer "reservation_limit", :default => 0, :null => false
|
1175
|
+
t.integer "reservation_expired_period", :default => 7, :null => false
|
1176
|
+
t.boolean "set_due_date_before_closing_day", :default => false, :null => false
|
1177
|
+
t.datetime "fixed_due_date"
|
1178
|
+
t.text "note"
|
1179
|
+
t.integer "position"
|
1180
|
+
t.datetime "created_at", :null => false
|
1181
|
+
t.datetime "updated_at", :null => false
|
1182
|
+
t.integer "current_checkout_count"
|
1183
|
+
end
|
1184
|
+
|
1185
|
+
add_index "user_group_has_checkout_types", ["checkout_type_id"], :name => "index_user_group_has_checkout_types_on_checkout_type_id"
|
1186
|
+
add_index "user_group_has_checkout_types", ["user_group_id"], :name => "index_user_group_has_checkout_types_on_user_group_id"
|
1187
|
+
|
1188
|
+
create_table "user_groups", :force => true do |t|
|
1189
|
+
t.string "name"
|
1190
|
+
t.text "display_name"
|
1191
|
+
t.text "note"
|
1192
|
+
t.integer "position"
|
1193
|
+
t.datetime "created_at", :null => false
|
1194
|
+
t.datetime "updated_at", :null => false
|
1195
|
+
t.datetime "deleted_at"
|
1196
|
+
t.integer "valid_period_for_new_user", :default => 0, :null => false
|
1197
|
+
t.datetime "expired_at"
|
1198
|
+
t.integer "number_of_day_to_notify_overdue", :default => 1, :null => false
|
1199
|
+
t.integer "number_of_day_to_notify_due_date", :default => 7, :null => false
|
1200
|
+
t.integer "number_of_time_to_notify_overdue", :default => 3, :null => false
|
1201
|
+
end
|
1202
|
+
|
682
1203
|
create_table "user_has_roles", :force => true do |t|
|
683
1204
|
t.integer "user_id"
|
684
1205
|
t.integer "role_id"
|
@@ -686,37 +1207,101 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
686
1207
|
t.datetime "updated_at", :null => false
|
687
1208
|
end
|
688
1209
|
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
1210
|
+
add_index "user_has_roles", ["role_id"], :name => "index_user_has_roles_on_role_id"
|
1211
|
+
add_index "user_has_roles", ["user_id"], :name => "index_user_has_roles_on_user_id"
|
1212
|
+
|
1213
|
+
create_table "user_import_file_transitions", :force => true do |t|
|
1214
|
+
t.string "to_state"
|
1215
|
+
t.text "metadata", :default => "{}"
|
1216
|
+
t.integer "sort_key"
|
1217
|
+
t.integer "user_import_file_id"
|
1218
|
+
t.datetime "created_at", :null => false
|
1219
|
+
t.datetime "updated_at", :null => false
|
1220
|
+
end
|
1221
|
+
|
1222
|
+
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
|
1223
|
+
add_index "user_import_file_transitions", ["user_import_file_id"], :name => "index_user_import_file_transitions_on_user_import_file_id"
|
1224
|
+
|
1225
|
+
create_table "user_import_files", :force => true do |t|
|
1226
|
+
t.integer "user_id"
|
693
1227
|
t.text "note"
|
694
|
-
t.
|
1228
|
+
t.datetime "executed_at"
|
1229
|
+
t.string "user_import_file_name"
|
1230
|
+
t.string "user_import_content_type"
|
1231
|
+
t.string "user_import_file_size"
|
1232
|
+
t.datetime "user_import_updated_at"
|
1233
|
+
t.string "user_import_fingerprint"
|
1234
|
+
t.string "edit_mode"
|
1235
|
+
t.text "error_message"
|
1236
|
+
t.datetime "created_at", :null => false
|
1237
|
+
t.datetime "updated_at", :null => false
|
1238
|
+
t.string "user_encoding"
|
1239
|
+
t.integer "default_library_id"
|
1240
|
+
t.integer "default_user_group_id"
|
1241
|
+
end
|
1242
|
+
|
1243
|
+
create_table "user_import_results", :force => true do |t|
|
1244
|
+
t.integer "user_import_file_id"
|
1245
|
+
t.integer "user_id"
|
1246
|
+
t.text "body"
|
1247
|
+
t.datetime "created_at", :null => false
|
1248
|
+
t.datetime "updated_at", :null => false
|
1249
|
+
end
|
1250
|
+
|
1251
|
+
create_table "user_reserve_stat_transitions", :force => true do |t|
|
1252
|
+
t.string "to_state"
|
1253
|
+
t.text "metadata", :default => "{}"
|
1254
|
+
t.integer "sort_key"
|
1255
|
+
t.integer "user_reserve_stat_id"
|
695
1256
|
t.datetime "created_at", :null => false
|
696
1257
|
t.datetime "updated_at", :null => false
|
697
|
-
|
698
|
-
|
1258
|
+
end
|
1259
|
+
|
1260
|
+
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
|
1261
|
+
add_index "user_reserve_stat_transitions", ["user_reserve_stat_id"], :name => "index_user_reserve_stat_transitions_on_user_reserve_stat_id"
|
1262
|
+
|
1263
|
+
create_table "user_reserve_stats", :force => true do |t|
|
1264
|
+
t.datetime "start_date"
|
1265
|
+
t.datetime "end_date"
|
1266
|
+
t.text "note"
|
1267
|
+
t.datetime "created_at", :null => false
|
1268
|
+
t.datetime "updated_at", :null => false
|
1269
|
+
t.datetime "started_at"
|
1270
|
+
t.datetime "completed_at"
|
1271
|
+
t.integer "user_id"
|
1272
|
+
end
|
1273
|
+
|
1274
|
+
add_index "user_reserve_stats", ["user_id"], :name => "index_user_reserve_stats_on_user_id"
|
1275
|
+
|
1276
|
+
create_table "users", :force => true do |t|
|
1277
|
+
t.string "email", :default => "", :null => false
|
1278
|
+
t.string "encrypted_password", :default => "", :null => false
|
699
1279
|
t.string "reset_password_token"
|
700
1280
|
t.datetime "reset_password_sent_at"
|
701
1281
|
t.datetime "remember_created_at"
|
702
|
-
t.integer "sign_in_count",
|
1282
|
+
t.integer "sign_in_count", :default => 0
|
703
1283
|
t.datetime "current_sign_in_at"
|
704
1284
|
t.datetime "last_sign_in_at"
|
705
1285
|
t.string "current_sign_in_ip"
|
706
1286
|
t.string "last_sign_in_ip"
|
707
|
-
t.
|
708
|
-
t.
|
709
|
-
t.
|
710
|
-
t.
|
711
|
-
t.string "
|
712
|
-
t.
|
1287
|
+
t.datetime "created_at", :null => false
|
1288
|
+
t.datetime "updated_at", :null => false
|
1289
|
+
t.boolean "save_checkout_history", :default => false, :null => false
|
1290
|
+
t.string "checkout_icalendar_token"
|
1291
|
+
t.string "username"
|
1292
|
+
t.datetime "deleted_at"
|
1293
|
+
t.datetime "expired_at"
|
1294
|
+
t.integer "failed_attempts", :default => 0
|
713
1295
|
t.string "unlock_token"
|
714
1296
|
t.datetime "locked_at"
|
715
|
-
t.
|
1297
|
+
t.datetime "confirmed_at"
|
716
1298
|
end
|
717
1299
|
|
1300
|
+
add_index "users", ["checkout_icalendar_token"], :name => "index_users_on_checkout_icalendar_token", :unique => true
|
718
1301
|
add_index "users", ["email"], :name => "index_users_on_email"
|
719
1302
|
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
|
1303
|
+
add_index "users", ["unlock_token"], :name => "index_users_on_unlock_token", :unique => true
|
1304
|
+
add_index "users", ["username"], :name => "index_users_on_username", :unique => true
|
720
1305
|
|
721
1306
|
create_table "versions", :force => true do |t|
|
722
1307
|
t.string "item_type", :null => false
|
@@ -729,16 +1314,4 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
729
1314
|
|
730
1315
|
add_index "versions", ["item_type", "item_id"], :name => "index_versions_on_item_type_and_item_id"
|
731
1316
|
|
732
|
-
create_table "work_has_subjects", :force => true do |t|
|
733
|
-
t.integer "subject_id"
|
734
|
-
t.string "subject_type"
|
735
|
-
t.integer "work_id"
|
736
|
-
t.integer "position"
|
737
|
-
t.datetime "created_at", :null => false
|
738
|
-
t.datetime "updated_at", :null => false
|
739
|
-
end
|
740
|
-
|
741
|
-
add_index "work_has_subjects", ["subject_id"], :name => "index_work_has_subjects_on_subject_id"
|
742
|
-
add_index "work_has_subjects", ["work_id"], :name => "index_work_has_subjects_on_work_id"
|
743
|
-
|
744
1317
|
end
|