Sha256: 89a2739129f711b9e4e3f4db2c3c77a5dfa28c46d6603f857eb11de33fbbd99e

Contents?: true

Size: 468 Bytes

Versions: 1

Compression:

Stored size: 468 Bytes

Contents

class CreateItemTransitions < ActiveRecord::Migration[5.1]
  def change
    create_table :item_transitions do |t|
      t.string :to_state, null: false
      t.jsonb :metadata, default: '{}'
      t.integer :sort_key, null: false
      t.uuid :item_id, null: false
      t.boolean :most_recent, null: false
      t.timestamps null: false
    end

    add_index :item_transitions, :item_id
    add_index :item_transitions, [:sort_key, :item_id], unique: true
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
enju_seed-0.4.0.beta.1 spec/dummy/db/migrate/20140529014410_create_item_transitions.rb