Sha256: ae6b37ec453bb75dc22d6335ce73d3d8501af8cef9034c9e27a6903b117a6a88

Contents?: true

Size: 576 Bytes

Versions: 3

Compression:

Stored size: 576 Bytes

Contents

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

  def up
    add_index :order_list_transitions, [:order_list_id, :most_recent], unique: true, where: "most_recent", name: "index_order_list_transitions_parent_most_recent" #, algorithm: :concurrently
    change_column_null :order_list_transitions, :most_recent, false
  end

  def down
    remove_index :order_list_transitions, name: "index_order_list_transitions_parent_most_recent"
    change_column_null :order_list_transitions, :most_recent, true
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
enju_purchase_request-0.3.2 db/migrate/20180107155817_add_constraints_to_most_recent_for_order_list_transitions.rb
enju_purchase_request-0.3.1 db/migrate/20180107155817_add_constraints_to_most_recent_for_order_list_transitions.rb
enju_purchase_request-0.3.0.beta.1 db/migrate/20180107155817_add_constraints_to_most_recent_for_order_list_transitions.rb