enju_seed 0.3.0.beta.2 → 0.3.0.beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/my_accounts_controller.rb +4 -4
- data/app/models/concerns/enju_seed/enju_user.rb +1 -1
- data/app/models/concerns/master_model.rb +1 -11
- data/app/models/identity.rb +1 -1
- data/app/models/profile.rb +6 -8
- data/app/models/role.rb +10 -27
- data/app/models/user_has_role.rb +2 -2
- data/app/policies/user_export_file_policy.rb +21 -0
- data/app/policies/user_import_file_policy.rb +21 -0
- data/app/policies/user_import_result_policy.rb +21 -0
- data/app/views/my_accounts/_edit_credential.html.slim +6 -6
- data/app/views/my_accounts/show.html.slim +1 -1
- data/app/views/profiles/_edit_credential.html.erb +6 -6
- data/app/views/profiles/_edit_credential.html.slim +6 -6
- data/app/views/profiles/new.html.slim +3 -3
- data/app/views/roles/index.html.slim +1 -1
- data/app/views/roles/show.html.slim +1 -1
- data/db/migrate/041_create_roles.rb +5 -6
- data/db/migrate/20100606065209_create_user_has_roles.rb +3 -3
- data/db/migrate/20140122054321_create_profiles.rb +5 -13
- data/db/migrate/20140811031145_add_expired_at_to_profile.rb +1 -1
- data/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +1 -1
- data/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +1 -1
- data/db/migrate/20150421023923_create_identities.rb +4 -6
- data/db/migrate/20151126005552_add_provider_to_identity.rb +2 -2
- data/db/migrate/20170114174536_add_profile_id_to_user.rb +5 -0
- data/lib/enju_seed/engine.rb +2 -0
- data/lib/enju_seed/version.rb +1 -1
- data/spec/controllers/my_accounts_controller_spec.rb +0 -12
- data/spec/controllers/profiles_controller_spec.rb +24 -21
- data/spec/controllers/roles_controller_spec.rb +1 -1
- data/spec/dummy/db/migrate/005_create_manifestations.rb +12 -13
- data/spec/dummy/db/migrate/006_create_items.rb +7 -8
- data/spec/dummy/db/migrate/012_create_owns.rb +3 -5
- data/spec/dummy/db/migrate/015_create_creates.rb +3 -5
- data/spec/dummy/db/migrate/047_create_produces.rb +3 -5
- data/spec/dummy/db/migrate/059_create_libraries.rb +9 -10
- data/spec/dummy/db/migrate/069_create_shelves.rb +5 -6
- data/spec/dummy/db/migrate/073_create_carrier_types.rb +3 -3
- data/spec/dummy/db/migrate/077_create_user_groups.rb +4 -4
- data/spec/dummy/db/migrate/080_create_library_groups.rb +6 -7
- data/spec/dummy/db/migrate/112_create_frequencies.rb +3 -3
- data/spec/dummy/db/migrate/117_create_form_of_works.rb +3 -3
- data/spec/dummy/db/migrate/120_create_baskets.rb +3 -4
- data/spec/dummy/db/migrate/124_create_bookstores.rb +3 -3
- data/spec/dummy/db/migrate/130_create_request_status_types.rb +3 -3
- data/spec/dummy/db/migrate/131_create_request_types.rb +3 -3
- data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +3 -5
- data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +2 -4
- data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +4 -5
- data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +5 -7
- data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +3 -3
- data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +3 -3
- data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +4 -7
- data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +4 -6
- data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +3 -6
- data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +4 -5
- data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +2 -2
- data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +2 -2
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +5 -4
- data/spec/dummy/db/migrate/20140529014410_create_item_transitions.rb +15 -0
- data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +1 -1
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +5 -5
- data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb +2 -3
- data/spec/dummy/db/migrate/20141029131633_create_periodicals.rb +2 -2
- data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +3 -5
- data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +2 -2
- data/spec/dummy/db/migrate/20151216123621_create_doi_records.rb +4 -4
- data/spec/dummy/db/migrate/20160319144230_create_issn_records.rb +4 -4
- data/spec/dummy/db/migrate/20160506144040_create_isbn_records.rb +4 -4
- data/spec/dummy/db/schema.rb +173 -144
- data/spec/factories/profile.rb +4 -4
- data/spec/factories/user.rb +3 -0
- data/spec/fixtures/libraries.yml +37 -37
- data/spec/fixtures/library_groups.yml +27 -20
- data/spec/fixtures/profiles.yml +27 -35
- data/spec/fixtures/roles.yml +12 -12
- data/spec/fixtures/user_groups.yml +20 -10
- data/spec/fixtures/user_has_roles.yml +2 -2
- data/spec/fixtures/users.yml +7 -0
- data/spec/models/profile_spec.rb +7 -9
- data/spec/models/role_spec.rb +10 -11
- data/spec/models/user_has_role_spec.rb +3 -4
- data/spec/models/user_spec.rb +0 -1
- metadata +33 -20
- data/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +0 -11
- data/spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb +0 -5
- data/spec/dummy/db/migrate/20150124152756_add_foreign_key_to_shelves_referencing_libraries.rb +0 -6
- data/spec/dummy/db/migrate/20160703190209_add_foreign_key_on_manifestation_id_to_reserve.rb +0 -5
@@ -1,8 +1,8 @@
|
|
1
|
-
class CreateCarrierTypes < ActiveRecord::Migration
|
1
|
+
class CreateCarrierTypes < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :carrier_types do |t|
|
4
|
-
t.string :name, :
|
5
|
-
t.
|
4
|
+
t.string :name, null: false
|
5
|
+
t.jsonb :display_name_translations
|
6
6
|
t.text :note
|
7
7
|
t.integer :position
|
8
8
|
t.timestamps
|
@@ -1,8 +1,8 @@
|
|
1
|
-
class CreateUserGroups < ActiveRecord::Migration
|
1
|
+
class CreateUserGroups < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
|
-
create_table :user_groups do |t|
|
4
|
-
t.string :name,
|
5
|
-
t.
|
3
|
+
create_table :user_groups, id: :uuid, default: 'gen_random_uuid()' do |t|
|
4
|
+
t.string :name, null: true
|
5
|
+
t.jsonb :display_name_translations
|
6
6
|
t.text :note
|
7
7
|
t.integer :position
|
8
8
|
t.timestamps
|
@@ -1,17 +1,16 @@
|
|
1
|
-
class CreateLibraryGroups < ActiveRecord::Migration
|
1
|
+
class CreateLibraryGroups < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :library_groups do |t|
|
4
|
-
t.string :name, :null
|
5
|
-
t.
|
6
|
-
t.string :short_name, :null
|
7
|
-
t.
|
8
|
-
t.
|
4
|
+
t.string :name, index: {unique: true}, null: false
|
5
|
+
t.jsonb :display_name_translations
|
6
|
+
t.string :short_name, index: {unique: true}, null: false
|
7
|
+
t.cidr :my_networks
|
8
|
+
t.jsonb :login_banner_translations
|
9
9
|
t.text :note
|
10
10
|
t.integer :country_id
|
11
11
|
t.integer :position
|
12
12
|
|
13
13
|
t.timestamps
|
14
14
|
end
|
15
|
-
add_index :library_groups, :short_name
|
16
15
|
end
|
17
16
|
end
|
@@ -1,8 +1,8 @@
|
|
1
|
-
class CreateFrequencies < ActiveRecord::Migration
|
1
|
+
class CreateFrequencies < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :frequencies do |t|
|
4
|
-
t.string :name, :
|
5
|
-
t.
|
4
|
+
t.string :name, null: false
|
5
|
+
t.jsonb :display_name_translations
|
6
6
|
t.text :note
|
7
7
|
t.integer :position
|
8
8
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
class CreateFormOfWorks < ActiveRecord::Migration
|
1
|
+
class CreateFormOfWorks < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :form_of_works do |t|
|
4
|
-
t.string :name, :
|
5
|
-
t.
|
4
|
+
t.string :name, null: false
|
5
|
+
t.jsonb :display_name_translations
|
6
6
|
t.text :note
|
7
7
|
t.integer :position
|
8
8
|
|
@@ -1,12 +1,11 @@
|
|
1
|
-
class CreateBaskets < ActiveRecord::Migration
|
1
|
+
class CreateBaskets < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :baskets do |t|
|
4
|
-
t.
|
4
|
+
t.references :user, foreign_key: true
|
5
5
|
t.text :note
|
6
|
-
t.integer :lock_version, :
|
6
|
+
t.integer :lock_version, default: 0, null: false
|
7
7
|
|
8
8
|
t.timestamps
|
9
9
|
end
|
10
|
-
add_index :baskets, :user_id
|
11
10
|
end
|
12
11
|
end
|
@@ -1,7 +1,7 @@
|
|
1
|
-
class CreateBookstores < ActiveRecord::Migration
|
1
|
+
class CreateBookstores < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
|
-
create_table :bookstores do |t|
|
4
|
-
t.
|
3
|
+
create_table :bookstores, id: :uuid, default: 'gen_random_uuid()' do |t|
|
4
|
+
t.string :name, null: false
|
5
5
|
t.string :zip_code
|
6
6
|
t.text :address
|
7
7
|
t.text :note
|
@@ -1,8 +1,8 @@
|
|
1
|
-
class CreateRequestStatusTypes < ActiveRecord::Migration
|
1
|
+
class CreateRequestStatusTypes < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :request_status_types do |t|
|
4
|
-
t.string :name, :null
|
5
|
-
t.
|
4
|
+
t.string :name, index: {unique: true}, null: false
|
5
|
+
t.jsonb :display_name_translations
|
6
6
|
t.text :note
|
7
7
|
t.integer :position
|
8
8
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
class CreateRequestTypes < ActiveRecord::Migration
|
1
|
+
class CreateRequestTypes < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :request_types do |t|
|
4
|
-
t.string :name, :null
|
5
|
-
t.
|
4
|
+
t.string :name, index: {unique: true}, null: false
|
5
|
+
t.jsonb :display_name_translations
|
6
6
|
t.text :note
|
7
7
|
t.integer :position
|
8
8
|
|
@@ -1,13 +1,11 @@
|
|
1
|
-
class CreateRealizes < ActiveRecord::Migration
|
1
|
+
class CreateRealizes < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :realizes do |t|
|
4
|
-
t.references :agent, :
|
5
|
-
t.references :expression, :
|
4
|
+
t.references :agent, null: false, index: true
|
5
|
+
t.references :expression, null: false, index: true, type: :uuid
|
6
6
|
t.integer :position
|
7
7
|
|
8
8
|
t.timestamps
|
9
9
|
end
|
10
|
-
add_index :realizes, :agent_id
|
11
|
-
add_index :realizes, :expression_id
|
12
10
|
end
|
13
11
|
end
|
@@ -1,13 +1,11 @@
|
|
1
1
|
class CreateExemplifies < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :exemplifies do |t|
|
4
|
-
t.
|
5
|
-
t.
|
4
|
+
t.references :manifestation, foreign_key: true, null: false, type: :uuid
|
5
|
+
t.references :item, foreign_key: true, index: {unique: true}, null: false, type: :uuid
|
6
6
|
t.integer :position
|
7
7
|
|
8
8
|
t.timestamps
|
9
9
|
end
|
10
|
-
add_index :exemplifies, :manifestation_id
|
11
|
-
add_index :exemplifies, :item_id, :unique => true
|
12
10
|
end
|
13
11
|
end
|
@@ -1,17 +1,16 @@
|
|
1
|
-
class CreateSubscriptions < ActiveRecord::Migration
|
1
|
+
class CreateSubscriptions < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :subscriptions do |t|
|
4
|
-
t.text :title, :
|
4
|
+
t.text :title, null: false
|
5
5
|
t.text :note
|
6
6
|
#t.integer :subscription_list_id, :integer
|
7
|
-
t.
|
7
|
+
t.references :user, foreign_key: true
|
8
8
|
t.integer :order_list_id
|
9
9
|
t.datetime :deleted_at
|
10
|
-
t.integer :subscribes_count, :
|
10
|
+
t.integer :subscribes_count, default: 0, null: false
|
11
11
|
|
12
12
|
t.timestamps
|
13
13
|
end
|
14
|
-
add_index :subscriptions, :user_id
|
15
14
|
add_index :subscriptions, :order_list_id
|
16
15
|
end
|
17
16
|
end
|
@@ -1,14 +1,12 @@
|
|
1
|
-
class CreateSubscribes < ActiveRecord::Migration
|
1
|
+
class CreateSubscribes < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :subscribes do |t|
|
4
|
-
t.
|
5
|
-
t.
|
6
|
-
t.datetime :start_at, :
|
7
|
-
t.datetime :end_at, :
|
4
|
+
t.references :subscription, foreign_key: true
|
5
|
+
t.uuid :work_id, null: false, index: true
|
6
|
+
t.datetime :start_at, null: false
|
7
|
+
t.datetime :end_at, null: false
|
8
8
|
|
9
9
|
t.timestamps
|
10
10
|
end
|
11
|
-
add_index :subscribes, :subscription_id
|
12
|
-
add_index :subscribes, :work_id
|
13
11
|
end
|
14
12
|
end
|
@@ -1,8 +1,8 @@
|
|
1
|
-
class CreateMediumOfPerformances < ActiveRecord::Migration
|
1
|
+
class CreateMediumOfPerformances < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :medium_of_performances do |t|
|
4
|
-
t.string :name, :
|
5
|
-
t.
|
4
|
+
t.string :name, null: false
|
5
|
+
t.jsonb :display_name_translations
|
6
6
|
t.text :note
|
7
7
|
t.integer :position
|
8
8
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
class CreateContentTypes < ActiveRecord::Migration
|
1
|
+
class CreateContentTypes < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :content_types do |t|
|
4
|
-
t.string :name, :
|
5
|
-
t.
|
4
|
+
t.string :name, null: false
|
5
|
+
t.jsonb :display_name_translations
|
6
6
|
t.text :note
|
7
7
|
t.integer :position
|
8
8
|
|
@@ -1,14 +1,11 @@
|
|
1
|
-
class CreateImportRequests < ActiveRecord::Migration
|
1
|
+
class CreateImportRequests < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :import_requests do |t|
|
4
|
-
t.string :isbn
|
5
|
-
t.
|
6
|
-
t.
|
4
|
+
t.string :isbn, index: true
|
5
|
+
t.references :manifestation, foreign_key: true, type: :uuid
|
6
|
+
t.references :user, foreign_key: true
|
7
7
|
|
8
8
|
t.timestamps
|
9
9
|
end
|
10
|
-
add_index :import_requests, :isbn
|
11
|
-
add_index :import_requests, :manifestation_id
|
12
|
-
add_index :import_requests, :user_id
|
13
10
|
end
|
14
11
|
end
|
@@ -1,13 +1,11 @@
|
|
1
|
-
class CreateManifestationRelationships < ActiveRecord::Migration
|
1
|
+
class CreateManifestationRelationships < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :manifestation_relationships do |t|
|
4
|
-
t.
|
5
|
-
t.
|
6
|
-
t.
|
4
|
+
t.uuid :parent_id, index: true
|
5
|
+
t.uuid :child_id, index: true
|
6
|
+
t.references :manifestation_relationship_type, index: {name: 'index_manifestation_relationships_on_relationship_type_id'}
|
7
7
|
|
8
8
|
t.timestamps
|
9
9
|
end
|
10
|
-
add_index :manifestation_relationships, :parent_id
|
11
|
-
add_index :manifestation_relationships, :child_id
|
12
10
|
end
|
13
11
|
end
|
@@ -1,14 +1,11 @@
|
|
1
|
-
class CreateAccepts < ActiveRecord::Migration
|
1
|
+
class CreateAccepts < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :accepts do |t|
|
4
|
-
t.
|
5
|
-
t.
|
4
|
+
t.references :basket, foreign_key: {on_delete: :nullify}
|
5
|
+
t.references :item, foreign_key: true, type: :uuid
|
6
6
|
t.integer :librarian_id
|
7
7
|
|
8
8
|
t.timestamps
|
9
9
|
end
|
10
|
-
|
11
|
-
add_index :accepts, :basket_id
|
12
|
-
add_index :accepts, :item_id
|
13
10
|
end
|
14
11
|
end
|
@@ -1,15 +1,14 @@
|
|
1
|
-
class CreateIdentifiers < ActiveRecord::Migration
|
1
|
+
class CreateIdentifiers < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
create_table :identifiers do |t|
|
4
|
-
t.string :body, :
|
5
|
-
t.integer :identifier_type_id, :
|
6
|
-
t.
|
4
|
+
t.string :body, null: false
|
5
|
+
t.integer :identifier_type_id, null: false
|
6
|
+
t.references :manifestation, foreign_key: true, type: :uuid
|
7
7
|
t.boolean :primary
|
8
8
|
t.integer :position
|
9
9
|
|
10
10
|
t.timestamps
|
11
11
|
end
|
12
12
|
add_index :identifiers, [:body, :identifier_type_id]
|
13
|
-
add_index :identifiers, :manifestation_id
|
14
13
|
end
|
15
14
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
class CreateUserImportFiles < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :user_import_files do |t|
|
4
|
-
t.
|
4
|
+
t.integer :user_id
|
5
5
|
t.text :note
|
6
6
|
t.datetime :executed_at
|
7
7
|
t.string :user_import_file_name
|
8
8
|
t.string :user_import_content_type
|
9
|
-
t.
|
9
|
+
t.string :user_import_file_size
|
10
10
|
t.datetime :user_import_updated_at
|
11
11
|
t.string :user_import_fingerprint
|
12
12
|
t.string :edit_mode
|
@@ -1,8 +1,8 @@
|
|
1
1
|
class CreateUserImportResults < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :user_import_results do |t|
|
4
|
-
t.
|
5
|
-
t.
|
4
|
+
t.integer :user_import_file_id
|
5
|
+
t.integer :user_id
|
6
6
|
t.text :body
|
7
7
|
|
8
8
|
t.timestamps
|
@@ -2,16 +2,17 @@ class CreateUserImportFileTransitions < ActiveRecord::Migration
|
|
2
2
|
def change
|
3
3
|
create_table :user_import_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
|
-
t.
|
11
|
+
t.integer :user_import_file_id
|
12
12
|
t.timestamps
|
13
13
|
end
|
14
14
|
|
15
|
-
add_index :user_import_file_transitions,
|
15
|
+
add_index :user_import_file_transitions, :user_import_file_id
|
16
|
+
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
17
|
end
|
17
18
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class CreateItemTransitions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :item_transitions do |t|
|
4
|
+
t.string :to_state, null: false
|
5
|
+
t.jsonb :metadata, default: '{}'
|
6
|
+
t.integer :sort_key, null: false
|
7
|
+
t.uuid :item_id, null: false
|
8
|
+
t.boolean :most_recent, null: false
|
9
|
+
t.timestamps null: false
|
10
|
+
end
|
11
|
+
|
12
|
+
add_index :item_transitions, :item_id
|
13
|
+
add_index :item_transitions, [:sort_key, :item_id], unique: true
|
14
|
+
end
|
15
|
+
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
|
-
t.
|
11
|
+
t.integer :user_export_file_id
|
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,5 @@
|
|
1
|
-
class AddManifestationIdToItem < ActiveRecord::Migration
|
1
|
+
class AddManifestationIdToItem < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
|
-
|
4
|
-
add_index :items, :manifestation_id
|
3
|
+
add_reference :items, :manifestation, type: :uuid, foreign_key: true
|
5
4
|
end
|
6
5
|
end
|