Sha256: 920ee50c557d7a0d9e9d9a52e6e39b9d6e5e31cb14c65f894c848f0c4074cb76

Contents?: true

Size: 640 Bytes

Versions: 2

Compression:

Stored size: 640 Bytes

Contents

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

  def up
    add_index :user_checkout_stat_transitions, [:user_checkout_stat_id, :most_recent], unique: true, where: "most_recent", name: "index_user_checkout_stat_transitions_parent_most_recent" # , algorithm: :concurrently
    change_column_null :user_checkout_stat_transitions, :most_recent, false
  end

  def down
    remove_index :user_checkout_stat_transitions, name: "index_user_checkout_stat_transitions_parent_most_recent"
    change_column_null :user_checkout_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/20180107161951_add_constraints_to_most_recent_for_user_checkout_stat_transitions.rb
enju_circulation-0.4.0.rc.1 db/migrate/20180107161951_add_constraints_to_most_recent_for_user_checkout_stat_transitions.rb