Sha256: 70594399ee67da089ec06b28b1e5992024538430baed3acdb13b78baf3e730df
Contents?: true
Size: 630 Bytes
Versions: 23
Compression:
Stored size: 630 Bytes
Contents
# frozen_string_literal: true 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
23 entries across 23 versions & 1 rubygems