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