Sha256: eb0020e90a778ab5f44a69b0539d8bbf2d6621a4004f52a63a0d0c8da94072ce

Contents?: true

Size: 608 Bytes

Versions: 6

Compression:

Stored size: 608 Bytes

Contents

class AddConstraintsToMostRecentForImportRequestTransitions < ActiveRecord::Migration[4.2]
  disable_ddl_transaction!

  def up
    add_index :import_request_transitions, %i[import_request_id most_recent], unique: true, where: "most_recent", name: "index_import_request_transitions_parent_most_recent" # , algorithm: :concurrently
    change_column_null :import_request_transitions, :most_recent, false
  end

  def down
    remove_index :import_request_transitions, name: "index_import_request_transitions_parent_most_recent"
    change_column_null :import_request_transitions, :most_recent, true
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
enju_manifestation_viewer-0.3.3 spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb
enju_manifestation_viewer-0.3.2 spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb
enju_manifestation_viewer-0.3.1 spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb
enju_manifestation_viewer-0.3.0 spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb
enju_manifestation_viewer-0.3.0.rc.1 spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb
enju_manifestation_viewer-0.3.0.beta.2 spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb