Sha256: ab1b2e6c4f7d398b9e59c09f1bf1e06ec22e06fedd3c635e10ced33af37b73fa

Contents?: true

Size: 554 Bytes

Versions: 55

Compression:

Stored size: 554 Bytes

Contents

class AddConstraintsToMostRecentForReserveTransitions < ActiveRecord::Migration[4.2]
  disable_ddl_transaction!

  def up
    add_index :reserve_transitions, [:reserve_id, :most_recent], unique: true, where: "most_recent", name: "index_reserve_transitions_parent_most_recent" # , algorithm: :concurrently
    change_column_null :reserve_transitions, :most_recent, false
  end

  def down
    remove_index :reserve_transitions, name: "index_reserve_transitions_parent_most_recent"
    change_column_null :reserve_transitions, :most_recent, true
  end
end

Version data entries

55 entries across 55 versions & 3 rubygems

Version Path
enju_biblio-0.3.18 spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_biblio-0.3.17 spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_biblio-0.3.16 spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_circulation-0.3.11 db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_biblio-0.3.15 spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_library-0.3.11 spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_circulation-0.3.10 db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_library-0.3.10 spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_biblio-0.3.14 spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_biblio-0.3.13 spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_circulation-0.3.9 db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_biblio-0.3.12 spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_biblio-0.3.11 spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_library-0.3.9 spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_biblio-0.3.10 spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_library-0.3.8 spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_biblio-0.3.10.rc.3 spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_biblio-0.3.10.rc.2 spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_library-0.3.8.rc.2 spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
enju_library-0.3.8.rc.1 spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb