Sha256: b467c1361a8c07348e5dc10f2bdf5c3799c2028c0f2031215ad8b2e6cc9b9117

Contents?: true

Size: 631 Bytes

Versions: 6

Compression:

Stored size: 631 Bytes

Contents

class AddConstraintsToMostRecentForAgentImportFileTransitions < ActiveRecord::Migration[5.2]
  disable_ddl_transaction!

  def up
    add_index :agent_import_file_transitions, [:agent_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_agent_import_file_transitions_parent_most_recent" #, algorithm: :concurrently
    change_column_null :agent_import_file_transitions, :most_recent, false
  end

  def down
    remove_index :agent_import_file_transitions, name: "index_agent_import_file_transitions_parent_most_recent"
    change_column_null :agent_import_file_transitions, :most_recent, true
  end
end

Version data entries

6 entries across 6 versions & 6 rubygems

Version Path
enju_inventory-0.4.0.rc.1 spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb
enju_ndl-0.4.0.rc.1 spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb
enju_circulation-0.4.0.rc.1 spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb
enju_manifestation_viewer-0.4.0.rc.1 spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb
enju_subject-0.4.0.rc.1 spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb
enju_event-0.4.0.rc.1 spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb