Sha256: 5c05cc58d2bde174eb90692e7332b7829ac0b10a67a4b61e1f1b767039c6d75d

Contents?: true

Size: 664 Bytes

Versions: 171

Compression:

Stored size: 664 Bytes

Contents

class CreateUserReserveStatTransitions < ActiveRecord::Migration
  def change
    create_table :user_reserve_stat_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 :user_reserve_stat_id
      t.timestamps
    end

    add_index :user_reserve_stat_transitions, :user_reserve_stat_id
    add_index :user_reserve_stat_transitions, [:sort_key, :user_reserve_stat_id], unique: true, name: "index_user_reserve_stat_transitions_on_sort_key_and_stat_id"
  end
end

Version data entries

171 entries across 164 versions & 11 rubygems

Version Path
enju_biblio-0.1.2 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_library-0.1.1 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_circulation-0.1.1 db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_ndl-0.1.1 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_event-0.1.18 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_leaf-1.1.2 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_leaf-1.1.1 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_flower-0.1.0 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_biblio-0.1.1 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_oai-0.1.0 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_library-0.1.0 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_bookmark-0.1.2 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_biblio-0.1.0 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_inter_library_loan-0.1.0 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_circulation-0.1.0 db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_ndl-0.1.0 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_event-0.1.17 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_leaf-1.1.0 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_inter_library_loan-0.1.0.pre12 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_bookmark-0.1.2.pre23 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb