Sha256: 10194ce651ea06acaf62d0464b9673458ac7a452fb09946f267ae65e9034e237

Contents?: true

Size: 632 Bytes

Versions: 2

Compression:

Stored size: 632 Bytes

Contents

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

  def up
    add_index :user_reserve_stat_transitions, [:user_reserve_stat_id, :most_recent], unique: true, where: "most_recent", name: "index_user_reserve_stat_transitions_parent_most_recent" # , algorithm: :concurrently
    change_column_null :user_reserve_stat_transitions, :most_recent, false
  end

  def down
    remove_index :user_reserve_stat_transitions, name: "index_user_reserve_stat_transitions_parent_most_recent"
    change_column_null :user_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/20180107162009_add_constraints_to_most_recent_for_user_reserve_stat_transitions.rb
enju_circulation-0.4.0.rc.1 db/migrate/20180107162009_add_constraints_to_most_recent_for_user_reserve_stat_transitions.rb