Sha256: d67b5f9c957ba3c019617bc2058c3dd446caedbd748e6344f0187c9830c30904
Contents?: true
Size: 506 Bytes
Versions: 19
Compression:
Stored size: 506 Bytes
Contents
class CreateItemTransitions < ActiveRecord::Migration def change create_table :item_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 :item_id t.timestamps end add_index :item_transitions, :item_id add_index :item_transitions, [:sort_key, :item_id], unique: true end end
Version data entries
19 entries across 19 versions & 1 rubygems