diff --git a/db/migrate/20200718191826_add_type_to_doi.rb b/db/migrate/20200718191826_add_type_to_doi.rb index 737567c45..d45e36bd1 100644 --- a/db/migrate/20200718191826_add_type_to_doi.rb +++ b/db/migrate/20200718191826_add_type_to_doi.rb @@ -5,7 +5,6 @@ def up remove_foreign_key "dataset", "datacentre" add_column :dataset, :type, :string, limit: 16 change_column_default :dataset, :type, "DataCiteDoi" - add_index :dataset, [:type], name: "index_dataset_on_type", length: { type: 16 } change_column_default :dataset, :agency, "datacite" end diff --git a/db/migrate/20200826173254_add_agency_index.rb b/db/migrate/20200826173254_add_agency_index.rb new file mode 100644 index 000000000..000eb681f --- /dev/null +++ b/db/migrate/20200826173254_add_agency_index.rb @@ -0,0 +1,9 @@ +class AddAgencyIndex < ActiveRecord::Migration[5.2] + def up + add_index :dataset, [:type], name: "index_dataset_on_type", length: { type: 16 } + end + + def down + remove_index :dataset, name: "index_dataset_on_type" + end +end diff --git a/db/schema.rb b/db/schema.rb index e838a12a1..3b9080ece 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2020_07_18_191826) do +ActiveRecord::Schema.define(version: 2020_08_26_173254) do create_table "active_storage_attachments", options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| t.string "name", limit: 191, null: false @@ -111,7 +111,7 @@ t.datetime "created_at" t.datetime "updated_at" t.bigint "provider_prefix_id" - t.string "uid", null: false + t.string "uid" t.index ["client_id", "prefix_id"], name: "index_client_prefixes_on_client_id_and_prefix_id", unique: true t.index ["client_id"], name: "FK13A1B3BA47B5F5FF" t.index ["prefix_id"], name: "FK13A1B3BAAF86A1C7" @@ -286,7 +286,7 @@ t.datetime "created_at" t.datetime "updated_at" t.string "uuid" - t.string "uid", null: false + t.string "uid" t.index ["prefix_id"], name: "FKE7FBD674AF86A1C7" t.index ["provider_id", "prefix_id"], name: "index_provider_prefixes_on_provider_id_and_prefix_id", unique: true t.index ["provider_id"], name: "FKE7FBD67446EBD781" diff --git a/lib/tasks/event.rake b/lib/tasks/event.rake index cbb784b80..b7ea31821 100644 --- a/lib/tasks/event.rake +++ b/lib/tasks/event.rake @@ -67,7 +67,7 @@ namespace :event do cursor: ENV["CURSOR"].present? ? Base64.urlsafe_decode64(ENV["CURSOR"]).split(",", 2) : [], filter: { update_target_doi: true }, query: ENV["QUERY"], - label: "[UpdateTargetDoi] Updating", + label: "[UpdateTargetDoi]", job_name: "TargetDoiByIdJob", } Event.loop_through_events(options)