Sha256: 95d8eb03a8b540d3c1590fa6fc7295aaae9d312987ab005e4e68dc5d3ee5f863

Contents?: true

Size: 634 Bytes

Versions: 2

Compression:

Stored size: 634 Bytes

Contents

class AddConstraintsToMostRecentForUserCheckoutStatTransitions < ActiveRecord::Migration
  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_inter_library_loan-0.2.0 spec/dummy/db/migrate/20180107161951_add_constraints_to_most_recent_for_user_checkout_stat_transitions.rb
enju_circulation-0.2.5 db/migrate/20180107161951_add_constraints_to_most_recent_for_user_checkout_stat_transitions.rb