Sha256: e9c5f21da8a7a2dcb1997796fc5c4bd6be361001df5195bc6e7a9110d47a1aac

Contents?: true

Size: 554 Bytes

Versions: 20

Compression:

Stored size: 554 Bytes

Contents

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

  def up
    add_index :message_transitions, [:message_id, :most_recent], unique: true, where: "most_recent", name: "index_message_transitions_parent_most_recent" # , algorithm: :concurrently
    change_column_null :message_transitions, :most_recent, false
  end

  def down
    remove_index :message_transitions, name: "index_message_transitions_parent_most_recent"
    change_column_null :message_transitions, :most_recent, true
  end
end

Version data entries

20 entries across 20 versions & 6 rubygems

Version Path
enju_message-0.3.4 db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_event-0.3.5 spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_seed-0.3.6 spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_message-0.3.3 db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_seed-0.3.5 spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_inventory-0.4.0.rc.1 spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_event-0.4.0.rc.1 spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_message-0.4.0.rc.1 db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_library-0.4.0.rc.1 spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_message-0.3.2 db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_event-0.3.4 spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_seed-0.3.4 spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_event-0.3.3 spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_library-0.4.0.beta.4 spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_leaf-2.0.0.beta.2 spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_library-0.4.0.beta.3 spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_library-0.4.0.beta.2 spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_leaf-2.0.0.beta.1 spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_library-0.4.0.beta.1 spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
enju_seed-0.3.3 spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb