Sha256: 7b5c4cc2eb4f900117ea56162d26d1ea16bf7f908a9d98cf137c374106fc0567

Contents?: true

Size: 532 Bytes

Versions: 101

Compression:

Stored size: 532 Bytes

Contents

class CreateReserveTransitions < ActiveRecord::Migration[4.2]
  def change
    create_table :reserve_transitions do |t|
      t.string :to_state
      if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
        t.text :metadata
      else
        t.text :metadata, default: "{}"
      end
      t.integer :sort_key
      t.integer :reserve_id
      t.timestamps
    end

    add_index :reserve_transitions, :reserve_id
    add_index :reserve_transitions, [:sort_key, :reserve_id], unique: true
  end
end

Version data entries

101 entries across 101 versions & 10 rubygems

Version Path
enju_library-0.3.5 spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb
enju_circulation-0.3.4 db/migrate/20140518050147_create_reserve_transitions.rb
enju_biblio-0.3.4 spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb
enju_biblio-0.3.3 spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb
enju_library-0.3.4 spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb
enju_seed-0.3.3 spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb
enju_library-0.3.3 spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb
enju_circulation-0.3.3 db/migrate/20140518050147_create_reserve_transitions.rb
enju_circulation-0.3.2 db/migrate/20140518050147_create_reserve_transitions.rb
enju_bookmark-0.3.1 spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb
enju_event-0.3.2 spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb
enju_library-0.3.2 spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb
enju_seed-0.3.2 spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb
enju_ndl-0.3.1 spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb
enju_seed-0.3.1 spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb
enju_circulation-0.3.1 db/migrate/20140518050147_create_reserve_transitions.rb
enju_oai-0.3.0 spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb
enju_library-0.3.1 spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb
enju_event-0.3.1 spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb
enju_bookmark-0.3.0 spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb