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

Version Path
statesman-12.1.0 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-12.0.0 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-11.0.0 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-10.2.3 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-10.2.2 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-10.2.1 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-10.2.0 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-10.1.0 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-10.0.0 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-9.0.1 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-9.0.0 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-8.0.3 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-8.0.2 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-8.0.1 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-8.0.0 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-7.4.1 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-7.4.0 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-7.3.0 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-7.2.0 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
statesman-7.1.0 spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb