enju_biblio 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/manifestations_controller.rb +1 -1
- data/app/jobs/agent_import_file_job.rb +1 -1
- data/app/jobs/resource_export_file_job.rb +1 -1
- data/app/jobs/resource_import_file_job.rb +1 -1
- data/app/mailers/agent_import_mailer.rb +17 -0
- data/app/mailers/resource_export_mailer.rb +17 -0
- data/app/mailers/resource_import_mailer.rb +17 -0
- data/app/models/agent.rb +4 -4
- data/app/models/agent_import_file.rb +13 -1
- data/app/models/agent_import_file_transition.rb +1 -1
- data/app/models/agent_import_result.rb +1 -1
- data/app/models/agent_merge.rb +1 -1
- data/app/models/agent_merge_list.rb +1 -1
- data/app/models/agent_relationship.rb +1 -1
- data/app/models/agent_relationship_type.rb +1 -1
- data/app/models/agent_type.rb +1 -1
- data/app/models/carrier_type.rb +1 -1
- data/app/models/content_type.rb +1 -1
- data/app/models/country.rb +1 -1
- data/app/models/create.rb +1 -1
- data/app/models/create_type.rb +1 -1
- data/app/models/donate.rb +1 -1
- data/app/models/form_of_work.rb +1 -1
- data/app/models/frequency.rb +1 -1
- data/app/models/identifier.rb +1 -1
- data/app/models/identifier_type.rb +1 -1
- data/app/models/import_request.rb +1 -1
- data/app/models/import_request_transition.rb +1 -1
- data/app/models/item.rb +3 -3
- data/app/models/language.rb +2 -18
- data/app/models/license.rb +1 -1
- data/app/models/manifestation.rb +16 -4
- data/app/models/manifestation_relationship.rb +1 -1
- data/app/models/manifestation_relationship_type.rb +1 -1
- data/app/models/medium_of_performance.rb +1 -1
- data/app/models/own.rb +1 -1
- data/app/models/picture_file.rb +1 -1
- data/app/models/produce.rb +1 -1
- data/app/models/produce_type.rb +1 -1
- data/app/models/realize.rb +1 -1
- data/app/models/realize_type.rb +1 -1
- data/app/models/resource_export_file.rb +6 -4
- data/app/models/resource_export_file_transition.rb +1 -1
- data/app/models/resource_import_file.rb +30 -6
- data/app/models/resource_import_file_transition.rb +1 -1
- data/app/models/resource_import_result.rb +1 -1
- data/app/models/series_statement.rb +1 -1
- data/app/models/series_statement_merge.rb +1 -1
- data/app/models/series_statement_merge_list.rb +1 -1
- data/app/views/agent_import_mailer/completed.en.text.erb +9 -0
- data/app/views/agent_import_mailer/completed.ja.text.erb +9 -0
- data/app/views/agent_import_mailer/failed.en.text +9 -0
- data/app/views/agent_import_mailer/failed.ja.text.erb +9 -0
- data/app/views/items/show.html+phone.erb +0 -9
- data/app/views/items/show.html.erb +0 -12
- data/app/views/manifestations/_manifestation.json.jbuilder +53 -0
- data/app/views/manifestations/index.json.jbuilder +6 -0
- data/app/views/picture_files/edit.html.erb +2 -22
- data/app/views/resource_export_mailer/completed.en.text.erb +9 -0
- data/app/views/resource_export_mailer/completed.ja.text.erb +9 -0
- data/app/views/resource_export_mailer/failed.en.text.erb +9 -0
- data/app/views/resource_export_mailer/failed.ja.text.erb +9 -0
- data/app/views/resource_import_mailer/completed.en.text.erb +9 -0
- data/app/views/resource_import_mailer/completed.ja.text.erb +9 -0
- data/app/views/resource_import_mailer/failed.en.text.erb +9 -0
- data/app/views/resource_import_mailer/failed.ja.text.erb +9 -0
- data/config/locales/translation_en.yml +11 -0
- data/config/locales/translation_ja.yml +11 -0
- data/lib/enju_biblio/version.rb +1 -1
- data/spec/controllers/items_controller_spec.rb +0 -37
- data/spec/dummy/app/jobs/application_job.rb +7 -0
- data/spec/dummy/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/models/user.rb +1 -7
- data/spec/dummy/config/application.rb +2 -1
- data/spec/dummy/db/migrate/029_create_subjects.rb +3 -6
- data/spec/dummy/db/migrate/032_create_checkins.rb +3 -6
- data/spec/dummy/db/migrate/033_create_checkouts.rb +6 -11
- data/spec/dummy/db/migrate/035_create_reserves.rb +4 -9
- data/spec/dummy/db/migrate/121_create_checked_items.rb +3 -4
- data/spec/dummy/db/migrate/129_create_item_has_use_restrictions.rb +2 -4
- data/spec/dummy/db/migrate/20081030023518_create_user_group_has_checkout_types.rb +2 -4
- data/spec/dummy/db/migrate/20081030023615_create_carrier_type_has_checkout_types.rb +2 -3
- data/spec/dummy/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb +2 -2
- data/spec/dummy/db/migrate/20081215094955_create_checkout_stat_has_users.rb +2 -4
- data/spec/dummy/db/migrate/20081216190517_create_reserve_stat_has_manifestations.rb +2 -2
- data/spec/dummy/db/migrate/20081220034117_create_reserve_stat_has_users.rb +2 -4
- data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +3 -3
- data/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb +2 -4
- data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +2 -2
- data/spec/dummy/db/migrate/20111129044509_add_pickup_location_to_reserve.rb +6 -0
- data/spec/dummy/db/migrate/20120424103932_add_librarian_id_to_checked_item.rb +1 -1
- data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +1 -1
- data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +4 -5
- data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140810061942_add_user_id_to_user_checkout_stat.rb +4 -8
- data/spec/dummy/db/migrate/20141014065831_add_shelf_id_to_checkout.rb +1 -2
- data/spec/dummy/db/migrate/20141020120523_add_library_id_to_checkout.rb +5 -0
- data/spec/dummy/db/migrate/20150106001709_create_demands.rb +11 -0
- data/spec/dummy/db/migrate/20150421023923_create_identities.rb +14 -0
- data/spec/dummy/db/migrate/20150923173139_add_url_to_classification.rb +5 -0
- data/spec/dummy/db/migrate/20150925092505_add_label_to_classification.rb +5 -0
- data/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb +5 -0
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +4 -11
- data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20180107161951_add_constraints_to_most_recent_for_user_checkout_stat_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20180107162009_add_constraints_to_most_recent_for_user_reserve_stat_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20180107162029_add_constraints_to_most_recent_for_manifestation_checkout_stat_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20180107162048_add_constraints_to_most_recent_for_manifestation_reserve_stat_transitions.rb +13 -0
- data/spec/dummy/db/schema.rb +51 -12
- data/spec/factories/agent.rb +1 -1
- data/spec/factories/identifier.rb +1 -0
- data/spec/factories/item.rb +0 -1
- data/spec/fixtures/reserve_transitions.yml +23 -7
- data/spec/mailers/agent_import_spec.rb +5 -0
- data/spec/mailers/previews/agent_import_preview.rb +4 -0
- data/spec/mailers/previews/resource_export_preview.rb +4 -0
- data/spec/mailers/previews/resource_import_preview.rb +4 -0
- data/spec/mailers/resource_export_spec.rb +5 -0
- data/spec/mailers/resource_import_spec.rb +5 -0
- data/spec/models/agent_spec.rb +1 -1
- data/spec/models/item_spec.rb +0 -41
- data/spec/models/manifestation_spec.rb +0 -32
- data/spec/models/resource_export_file_spec.rb +2 -26
- data/spec/models/resource_import_file_spec.rb +2 -2
- data/spec/policies/manifestation_policy_spec.rb +2 -5
- data/spec/views/items/index.html.erb_spec.rb +3 -10
- data/spec/views/manifestations/show.html.erb_spec.rb +1 -5
- metadata +121 -26
- data/spec/factories/checkout.rb +0 -9
- data/spec/fixtures/checked_items.yml +0 -35
- data/spec/fixtures/checkins.yml +0 -48
- data/spec/fixtures/checkouts.yml +0 -162
- data/spec/fixtures/item_has_use_restrictions.yml +0 -61
- data/spec/fixtures/lending_policies.yml +0 -92
@@ -11,6 +11,6 @@ class AddAdditionalAttributesToUser < ActiveRecord::Migration[4.2]
|
|
11
11
|
add_column :users, :confirmed_at, :datetime
|
12
12
|
|
13
13
|
add_index :users, :username, unique: true
|
14
|
-
add_index :users, :unlock_token,
|
14
|
+
add_index :users, :unlock_token, unique: true
|
15
15
|
end
|
16
16
|
end
|
@@ -1,20 +1,19 @@
|
|
1
1
|
class CreateProfiles < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :profiles do |t|
|
4
|
-
t.
|
5
|
-
t.
|
6
|
-
t.
|
4
|
+
t.references :user, index: true, foreign_key: true
|
5
|
+
t.references :user_group, index: true
|
6
|
+
t.references :library, index: true
|
7
7
|
t.string :locale
|
8
8
|
t.string :user_number
|
9
9
|
t.text :full_name
|
10
10
|
t.text :note
|
11
11
|
t.text :keyword_list
|
12
|
-
t.
|
12
|
+
t.references :required_role, index: false
|
13
13
|
|
14
14
|
t.timestamps
|
15
15
|
end
|
16
16
|
|
17
|
-
add_index :profiles, :user_id
|
18
17
|
add_index :profiles, :user_number, unique: true
|
19
18
|
end
|
20
19
|
end
|
@@ -13,6 +13,6 @@ class CreateReserveTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :reserve_transitions, :reserve_id
|
16
|
-
add_index :reserve_transitions,
|
16
|
+
add_index :reserve_transitions, [:sort_key, :reserve_id], unique: true
|
17
17
|
end
|
18
18
|
end
|
@@ -12,6 +12,6 @@ class CreateUserImportFileTransitions < ActiveRecord::Migration[4.2]
|
|
12
12
|
t.timestamps
|
13
13
|
end
|
14
14
|
|
15
|
-
add_index :user_import_file_transitions,
|
15
|
+
add_index :user_import_file_transitions, [:sort_key, :user_import_file_id], unique: true, name: "index_user_import_file_transitions_on_sort_key_and_file_id"
|
16
16
|
end
|
17
17
|
end
|
@@ -13,6 +13,6 @@ class CreateUserCheckoutStatTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :user_checkout_stat_transitions, :user_checkout_stat_id
|
16
|
-
add_index :user_checkout_stat_transitions,
|
16
|
+
add_index :user_checkout_stat_transitions, [:sort_key, :user_checkout_stat_id], unique: true, name: "index_user_checkout_stat_transitions_on_sort_key_and_stat_id"
|
17
17
|
end
|
18
18
|
end
|
@@ -13,6 +13,6 @@ class CreateUserReserveStatTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :user_reserve_stat_transitions, :user_reserve_stat_id
|
16
|
-
add_index :user_reserve_stat_transitions,
|
16
|
+
add_index :user_reserve_stat_transitions, [:sort_key, :user_reserve_stat_id], unique: true, name: "index_user_reserve_stat_transitions_on_sort_key_and_stat_id"
|
17
17
|
end
|
18
18
|
end
|
@@ -13,6 +13,6 @@ class CreateManifestationCheckoutStatTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :manifestation_checkout_stat_transitions, :manifestation_checkout_stat_id, name: "index_manifestation_checkout_stat_transitions_on_stat_id"
|
16
|
-
add_index :manifestation_checkout_stat_transitions,
|
16
|
+
add_index :manifestation_checkout_stat_transitions, [:sort_key, :manifestation_checkout_stat_id], unique: true, name: "index_manifestation_checkout_stat_transitions_on_transition"
|
17
17
|
end
|
18
18
|
end
|
@@ -13,6 +13,6 @@ class CreateManifestationReserveStatTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
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,
|
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
|
@@ -13,6 +13,6 @@ class CreateUserExportFileTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
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,
|
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,12 +1,8 @@
|
|
1
1
|
class AddUserIdToUserCheckoutStat < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
add_index :user_checkout_stats, :user_id
|
8
|
-
add_index :user_reserve_stats, :user_id
|
9
|
-
add_index :manifestation_checkout_stats, :user_id
|
10
|
-
add_index :manifestation_reserve_stats, :user_id
|
3
|
+
add_reference :user_checkout_stats, :user, index: true, foreign_key: true
|
4
|
+
add_reference :user_reserve_stats, :user, index: true, foreign_key: true
|
5
|
+
add_reference :manifestation_checkout_stats, :user, index: true, foreign_key: true
|
6
|
+
add_reference :manifestation_reserve_stats, :user, index: true, foreign_key: true
|
11
7
|
end
|
12
8
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class CreateDemands < ActiveRecord::Migration[4.2]
|
2
|
+
def change
|
3
|
+
create_table :demands do |t|
|
4
|
+
t.references :user, index: true, foreign_key: true
|
5
|
+
t.references :item, index: true, foreign_key: true
|
6
|
+
t.references :message, index: true, foreign_key: true
|
7
|
+
|
8
|
+
t.timestamps null: false
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateIdentities < ActiveRecord::Migration[4.2]
|
2
|
+
def change
|
3
|
+
create_table :identities do |t|
|
4
|
+
t.string :name
|
5
|
+
t.string :email
|
6
|
+
t.string :password_digest
|
7
|
+
t.references :profile, index: true
|
8
|
+
|
9
|
+
t.timestamps null: false
|
10
|
+
end
|
11
|
+
add_index :identities, :name
|
12
|
+
add_index :identities, :email
|
13
|
+
end
|
14
|
+
end
|
@@ -3,13 +3,10 @@ class AddTranslationTableToLibraryGroup < ActiveRecord::Migration[4.2]
|
|
3
3
|
def up
|
4
4
|
if defined?(Globalize)
|
5
5
|
LibraryGroup.create_translation_table!({
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
if defined?(AwesomeHstoreTranslate)
|
12
|
-
add_column :library_groups, :login_banner, :hstore
|
6
|
+
login_banner: :text
|
7
|
+
}, {
|
8
|
+
migrate_data: true
|
9
|
+
})
|
13
10
|
end
|
14
11
|
end
|
15
12
|
|
@@ -17,9 +14,5 @@ class AddTranslationTableToLibraryGroup < ActiveRecord::Migration[4.2]
|
|
17
14
|
if defined?(Globalize)
|
18
15
|
LibraryGroup.drop_translation_table! migrate_data: true
|
19
16
|
end
|
20
|
-
|
21
|
-
if defined?(AwesomeHstoreTranslate)
|
22
|
-
remove_column :library_groups, :login_banner
|
23
|
-
end
|
24
17
|
end
|
25
18
|
end
|
@@ -2,7 +2,7 @@ class AddConstraintsToMostRecentForUserImportFileTransitions < ActiveRecord::Mig
|
|
2
2
|
disable_ddl_transaction!
|
3
3
|
|
4
4
|
def up
|
5
|
-
add_index :user_import_file_transitions,
|
5
|
+
add_index :user_import_file_transitions, [:user_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_user_import_file_transitions_parent_most_recent" #, algorithm: :concurrently
|
6
6
|
change_column_null :user_import_file_transitions, :most_recent, false
|
7
7
|
end
|
8
8
|
|
@@ -2,7 +2,7 @@ class AddConstraintsToMostRecentForUserExportFileTransitions < ActiveRecord::Mig
|
|
2
2
|
disable_ddl_transaction!
|
3
3
|
|
4
4
|
def up
|
5
|
-
add_index :user_export_file_transitions,
|
5
|
+
add_index :user_export_file_transitions, [:user_export_file_id, :most_recent], unique: true, where: "most_recent", name: "index_user_export_file_transitions_parent_most_recent" #, algorithm: :concurrently
|
6
6
|
change_column_null :user_export_file_transitions, :most_recent, false
|
7
7
|
end
|
8
8
|
|
data/spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForReserveTransitions < ActiveRecord::Migration[4.2]
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :reserve_transitions, [:reserve_id, :most_recent], unique: true, where: "most_recent", name: "index_reserve_transitions_parent_most_recent" # , algorithm: :concurrently
|
6
|
+
change_column_null :reserve_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :reserve_transitions, name: "index_reserve_transitions_parent_most_recent"
|
11
|
+
change_column_null :reserve_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForUserCheckoutStatTransitions < ActiveRecord::Migration[4.2]
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :user_checkout_stat_transitions, [:user_checkout_stat_id, :most_recent], unique: true, where: "most_recent", name: "index_user_checkout_stat_transitions_parent_most_recent" # , algorithm: :concurrently
|
6
|
+
change_column_null :user_checkout_stat_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :user_checkout_stat_transitions, name: "index_user_checkout_stat_transitions_parent_most_recent"
|
11
|
+
change_column_null :user_checkout_stat_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForUserReserveStatTransitions < ActiveRecord::Migration[4.2]
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :user_reserve_stat_transitions, [:user_reserve_stat_id, :most_recent], unique: true, where: "most_recent", name: "index_user_reserve_stat_transitions_parent_most_recent" # , algorithm: :concurrently
|
6
|
+
change_column_null :user_reserve_stat_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :user_reserve_stat_transitions, name: "index_user_reserve_stat_transitions_parent_most_recent"
|
11
|
+
change_column_null :user_reserve_stat_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForManifestationCheckoutStatTransitions < ActiveRecord::Migration[4.2]
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :manifestation_checkout_stat_transitions, [:manifestation_checkout_stat_id, :most_recent], unique: true, where: "most_recent", name: "index_manifestation_checkout_stat_transitions_parent_most_rece" # , algorithm: :concurrently
|
6
|
+
change_column_null :manifestation_checkout_stat_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :manifestation_checkout_stat_transitions, name: "index_manifestation_checkout_stat_transitions_parent_most_rece"
|
11
|
+
change_column_null :manifestation_checkout_stat_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForManifestationReserveStatTransitions < ActiveRecord::Migration[4.2]
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :manifestation_reserve_stat_transitions, [:manifestation_reserve_stat_id, :most_recent], unique: true, where: "most_recent", name: "index_manifestation_reserve_stat_transitions_parent_most_recen" # , algorithm: :concurrently
|
6
|
+
change_column_null :manifestation_reserve_stat_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :manifestation_reserve_stat_transitions, name: "index_manifestation_reserve_stat_transitions_parent_most_recen"
|
11
|
+
change_column_null :manifestation_reserve_stat_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema.define(version:
|
13
|
+
ActiveRecord::Schema.define(version: 2018_01_07_162048) do
|
14
14
|
|
15
15
|
create_table "accepts", force: :cascade do |t|
|
16
16
|
t.integer "basket_id"
|
@@ -268,12 +268,15 @@ ActiveRecord::Schema.define(version: 2018_01_07_161410) do
|
|
268
268
|
create_table "checked_items", force: :cascade do |t|
|
269
269
|
t.integer "item_id", null: false
|
270
270
|
t.integer "basket_id", null: false
|
271
|
+
t.integer "librarian_id"
|
271
272
|
t.datetime "due_date", null: false
|
272
273
|
t.datetime "created_at"
|
273
274
|
t.datetime "updated_at"
|
274
|
-
t.integer "
|
275
|
+
t.integer "user_id"
|
275
276
|
t.index ["basket_id"], name: "index_checked_items_on_basket_id"
|
276
277
|
t.index ["item_id"], name: "index_checked_items_on_item_id"
|
278
|
+
t.index ["librarian_id"], name: "index_checked_items_on_librarian_id"
|
279
|
+
t.index ["user_id"], name: "index_checked_items_on_user_id"
|
277
280
|
end
|
278
281
|
|
279
282
|
create_table "checkins", force: :cascade do |t|
|
@@ -330,11 +333,13 @@ ActiveRecord::Schema.define(version: 2018_01_07_161410) do
|
|
330
333
|
t.datetime "created_at"
|
331
334
|
t.datetime "updated_at"
|
332
335
|
t.integer "shelf_id"
|
336
|
+
t.integer "library_id"
|
333
337
|
t.index ["basket_id"], name: "index_checkouts_on_basket_id"
|
334
338
|
t.index ["checkin_id"], name: "index_checkouts_on_checkin_id"
|
335
339
|
t.index ["item_id", "basket_id"], name: "index_checkouts_on_item_id_and_basket_id", unique: true
|
336
340
|
t.index ["item_id"], name: "index_checkouts_on_item_id"
|
337
341
|
t.index ["librarian_id"], name: "index_checkouts_on_librarian_id"
|
342
|
+
t.index ["library_id"], name: "index_checkouts_on_library_id"
|
338
343
|
t.index ["shelf_id"], name: "index_checkouts_on_shelf_id"
|
339
344
|
t.index ["user_id"], name: "index_checkouts_on_user_id"
|
340
345
|
end
|
@@ -367,6 +372,8 @@ ActiveRecord::Schema.define(version: 2018_01_07_161410) do
|
|
367
372
|
t.integer "lft"
|
368
373
|
t.integer "rgt"
|
369
374
|
t.integer "manifestation_id"
|
375
|
+
t.string "url"
|
376
|
+
t.string "label"
|
370
377
|
t.index ["category"], name: "index_classifications_on_category"
|
371
378
|
t.index ["classification_type_id"], name: "index_classifications_on_classification_type_id"
|
372
379
|
t.index ["manifestation_id"], name: "index_classifications_on_manifestation_id"
|
@@ -426,6 +433,17 @@ ActiveRecord::Schema.define(version: 2018_01_07_161410) do
|
|
426
433
|
t.index ["work_id"], name: "index_creates_on_work_id"
|
427
434
|
end
|
428
435
|
|
436
|
+
create_table "demands", force: :cascade do |t|
|
437
|
+
t.integer "user_id"
|
438
|
+
t.integer "item_id"
|
439
|
+
t.integer "message_id"
|
440
|
+
t.datetime "created_at", null: false
|
441
|
+
t.datetime "updated_at", null: false
|
442
|
+
t.index ["item_id"], name: "index_demands_on_item_id"
|
443
|
+
t.index ["message_id"], name: "index_demands_on_message_id"
|
444
|
+
t.index ["user_id"], name: "index_demands_on_user_id"
|
445
|
+
end
|
446
|
+
|
429
447
|
create_table "donates", force: :cascade do |t|
|
430
448
|
t.integer "agent_id", null: false
|
431
449
|
t.integer "item_id", null: false
|
@@ -563,6 +581,19 @@ ActiveRecord::Schema.define(version: 2018_01_07_161410) do
|
|
563
581
|
t.index ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
|
564
582
|
end
|
565
583
|
|
584
|
+
create_table "identities", force: :cascade do |t|
|
585
|
+
t.string "name"
|
586
|
+
t.string "email"
|
587
|
+
t.string "password_digest"
|
588
|
+
t.integer "profile_id"
|
589
|
+
t.datetime "created_at", null: false
|
590
|
+
t.datetime "updated_at", null: false
|
591
|
+
t.string "provider"
|
592
|
+
t.index ["email"], name: "index_identities_on_email"
|
593
|
+
t.index ["name"], name: "index_identities_on_name"
|
594
|
+
t.index ["profile_id"], name: "index_identities_on_profile_id"
|
595
|
+
end
|
596
|
+
|
566
597
|
create_table "import_request_transitions", force: :cascade do |t|
|
567
598
|
t.string "to_state"
|
568
599
|
t.text "metadata", default: "{}"
|
@@ -772,7 +803,8 @@ ActiveRecord::Schema.define(version: 2018_01_07_161410) do
|
|
772
803
|
t.integer "manifestation_checkout_stat_id"
|
773
804
|
t.datetime "created_at"
|
774
805
|
t.datetime "updated_at"
|
775
|
-
t.boolean "most_recent"
|
806
|
+
t.boolean "most_recent", null: false
|
807
|
+
t.index ["manifestation_checkout_stat_id", "most_recent"], name: "index_manifestation_checkout_stat_transitions_parent_most_rece", unique: true, where: "most_recent"
|
776
808
|
t.index ["manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_stat_id"
|
777
809
|
t.index ["sort_key", "manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_transition", unique: true
|
778
810
|
end
|
@@ -816,7 +848,8 @@ ActiveRecord::Schema.define(version: 2018_01_07_161410) do
|
|
816
848
|
t.integer "manifestation_reserve_stat_id"
|
817
849
|
t.datetime "created_at"
|
818
850
|
t.datetime "updated_at"
|
819
|
-
t.boolean "most_recent"
|
851
|
+
t.boolean "most_recent", null: false
|
852
|
+
t.index ["manifestation_reserve_stat_id", "most_recent"], name: "index_manifestation_reserve_stat_transitions_parent_most_recen", unique: true, where: "most_recent"
|
820
853
|
t.index ["manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_stat_id"
|
821
854
|
t.index ["sort_key", "manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_transition", unique: true
|
822
855
|
end
|
@@ -1051,6 +1084,8 @@ ActiveRecord::Schema.define(version: 2018_01_07_161410) do
|
|
1051
1084
|
t.text "full_name_transcription"
|
1052
1085
|
t.datetime "date_of_birth"
|
1053
1086
|
t.index ["checkout_icalendar_token"], name: "index_profiles_on_checkout_icalendar_token", unique: true
|
1087
|
+
t.index ["library_id"], name: "index_profiles_on_library_id"
|
1088
|
+
t.index ["user_group_id"], name: "index_profiles_on_user_group_id"
|
1054
1089
|
t.index ["user_id"], name: "index_profiles_on_user_id"
|
1055
1090
|
t.index ["user_number"], name: "index_profiles_on_user_number", unique: true
|
1056
1091
|
end
|
@@ -1120,7 +1155,8 @@ ActiveRecord::Schema.define(version: 2018_01_07_161410) do
|
|
1120
1155
|
t.integer "reserve_id"
|
1121
1156
|
t.datetime "created_at"
|
1122
1157
|
t.datetime "updated_at"
|
1123
|
-
t.boolean "most_recent"
|
1158
|
+
t.boolean "most_recent", null: false
|
1159
|
+
t.index ["reserve_id", "most_recent"], name: "index_reserve_transitions_parent_most_recent", unique: true, where: "most_recent"
|
1124
1160
|
t.index ["reserve_id"], name: "index_reserve_transitions_on_reserve_id"
|
1125
1161
|
t.index ["sort_key", "reserve_id"], name: "index_reserve_transitions_on_sort_key_and_reserve_id", unique: true
|
1126
1162
|
end
|
@@ -1138,12 +1174,13 @@ ActiveRecord::Schema.define(version: 2018_01_07_161410) do
|
|
1138
1174
|
t.datetime "deleted_at"
|
1139
1175
|
t.boolean "expiration_notice_to_patron", default: false
|
1140
1176
|
t.boolean "expiration_notice_to_library", default: false
|
1177
|
+
t.integer "pickup_location_id"
|
1141
1178
|
t.datetime "retained_at"
|
1142
1179
|
t.datetime "postponed_at"
|
1143
1180
|
t.integer "lock_version", default: 0, null: false
|
1144
1181
|
t.index ["item_id"], name: "index_reserves_on_item_id"
|
1145
1182
|
t.index ["manifestation_id"], name: "index_reserves_on_manifestation_id"
|
1146
|
-
t.index ["
|
1183
|
+
t.index ["pickup_location_id"], name: "index_reserves_on_pickup_location_id"
|
1147
1184
|
t.index ["user_id"], name: "index_reserves_on_user_id"
|
1148
1185
|
end
|
1149
1186
|
|
@@ -1397,8 +1434,9 @@ ActiveRecord::Schema.define(version: 2018_01_07_161410) do
|
|
1397
1434
|
t.integer "user_checkout_stat_id"
|
1398
1435
|
t.datetime "created_at"
|
1399
1436
|
t.datetime "updated_at"
|
1400
|
-
t.boolean "most_recent"
|
1437
|
+
t.boolean "most_recent", null: false
|
1401
1438
|
t.index ["sort_key", "user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_sort_key_and_stat_id", unique: true
|
1439
|
+
t.index ["user_checkout_stat_id", "most_recent"], name: "index_user_checkout_stat_transitions_parent_most_recent", unique: true, where: "most_recent"
|
1402
1440
|
t.index ["user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_user_checkout_stat_id"
|
1403
1441
|
end
|
1404
1442
|
|
@@ -1469,14 +1507,14 @@ ActiveRecord::Schema.define(version: 2018_01_07_161410) do
|
|
1469
1507
|
t.datetime "deleted_at"
|
1470
1508
|
t.integer "valid_period_for_new_user", default: 0, null: false
|
1471
1509
|
t.datetime "expired_at"
|
1472
|
-
t.integer "number_of_day_to_notify_overdue", default:
|
1473
|
-
t.integer "number_of_day_to_notify_due_date", default:
|
1510
|
+
t.integer "number_of_day_to_notify_overdue", default: 7, null: false
|
1511
|
+
t.integer "number_of_day_to_notify_due_date", default: 3, null: false
|
1474
1512
|
t.integer "number_of_time_to_notify_overdue", default: 3, null: false
|
1475
1513
|
end
|
1476
1514
|
|
1477
1515
|
create_table "user_has_roles", force: :cascade do |t|
|
1478
|
-
t.integer "user_id"
|
1479
|
-
t.integer "role_id"
|
1516
|
+
t.integer "user_id", null: false
|
1517
|
+
t.integer "role_id", null: false
|
1480
1518
|
t.datetime "created_at"
|
1481
1519
|
t.datetime "updated_at"
|
1482
1520
|
t.index ["role_id"], name: "index_user_has_roles_on_role_id"
|
@@ -1533,8 +1571,9 @@ ActiveRecord::Schema.define(version: 2018_01_07_161410) do
|
|
1533
1571
|
t.integer "user_reserve_stat_id"
|
1534
1572
|
t.datetime "created_at"
|
1535
1573
|
t.datetime "updated_at"
|
1536
|
-
t.boolean "most_recent"
|
1574
|
+
t.boolean "most_recent", null: false
|
1537
1575
|
t.index ["sort_key", "user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_sort_key_and_stat_id", unique: true
|
1576
|
+
t.index ["user_reserve_stat_id", "most_recent"], name: "index_user_reserve_stat_transitions_parent_most_recent", unique: true, where: "most_recent"
|
1538
1577
|
t.index ["user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_user_reserve_stat_id"
|
1539
1578
|
end
|
1540
1579
|
|