Sha256: 288d92c0cdf8027e03730fbfd54bfcb812efc074c93e0992d76d88772b10a7c2

Contents?: true

Size: 669 Bytes

Versions: 2

Compression:

Stored size: 669 Bytes

Contents

class CreateUserReserveStatTransitions < ActiveRecord::Migration[5.2]
  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

2 entries across 2 versions & 2 rubygems

Version Path
enju_inventory-0.4.0.rc.1 spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
enju_circulation-0.4.0.rc.1 db/migrate/20140528045539_create_user_reserve_stat_transitions.rb