Sha256: cd6181dca6230a0fb8f6f402049e089fb2d44a6f40654720eab3c64bfae6f7d1
Contents?: true
Size: 599 Bytes
Versions: 13
Compression:
Stored size: 599 Bytes
Contents
class AddConstraintsToMostRecentForBaconTransitions < ActiveRecord::Migration disable_ddl_transaction! def up add_index :bacon_transitions, %i[bacon_id most_recent], unique: true, where: "most_recent", name: "index_bacon_transitions_parent_most_recent", algorithm: :concurrently change_column_null :bacon_transitions, :most_recent, false end def down remove_index :bacon_transitions, name: "index_bacon_transitions_parent_most_recent" change_column_null :bacon_transitions, :most_recent, true end end
Version data entries
13 entries across 13 versions & 1 rubygems