Sha256: 87a7253af6fb40932018860eb476156cb75ea96a7edd7020dc899a6e995401b3

Contents?: true

Size: 702 Bytes

Versions: 2

Compression:

Stored size: 702 Bytes

Contents

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

  def up
    add_index :manifestation_reserve_stat_transitions, [:manifestation_reserve_stat_id, :most_recent], unique: true, where: "most_recent", name: "index_manifestation_reserve_stat_transitions_parent_most_recen" # , algorithm: :concurrently
    change_column_null :manifestation_reserve_stat_transitions, :most_recent, false
  end

  def down
    remove_index :manifestation_reserve_stat_transitions, name: "index_manifestation_reserve_stat_transitions_parent_most_recen"
    change_column_null :manifestation_reserve_stat_transitions, :most_recent, true
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
enju_inventory-0.4.0.rc.1 spec/dummy/db/migrate/20180107162048_add_constraints_to_most_recent_for_manifestation_reserve_stat_transitions.rb
enju_circulation-0.4.0.rc.1 db/migrate/20180107162048_add_constraints_to_most_recent_for_manifestation_reserve_stat_transitions.rb