Sha256: ef7132946aaed5d8efefe9ac824eb9bd59a334f559743f3dc677e04ef1f42700
Contents?: true
Size: 510 Bytes
Versions: 4
Compression:
Stored size: 510 Bytes
Contents
class CreateItemTransitions < ActiveRecord::Migration[4.2] 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, %i[sort_key item_id], unique: true end end
Version data entries
4 entries across 4 versions & 1 rubygems