Sha256: fe1d4268954008420dcca71a4e96733cc343ab9fd8811f2fcab3f0b6363b6ef3

Contents?: true

Size: 791 Bytes

Versions: 3

Compression:

Stored size: 791 Bytes

Contents

class CreateManifestationReserveStatTransitions < ActiveRecord::Migration
  def change
    create_table :manifestation_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 :manifestation_reserve_stat_id
      t.timestamps
    end

    add_index :manifestation_reserve_stat_transitions, :manifestation_reserve_stat_id, name: 'index_manifestation_reserve_stat_transitions_on_stat_id'
    add_index :manifestation_reserve_stat_transitions, [:sort_key, :manifestation_reserve_stat_id], unique: true, name: 'index_manifestation_reserve_stat_transitions_on_transition'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
enju_seed-0.3.0.beta.3 spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb
enju_seed-0.3.0.beta.2 spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb
enju_seed-0.3.0.beta.1 spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb