Sha256: 593513092b6f023a137da59a450aa34775661edd5505558a3f236f8a852c904a

Contents?: true

Size: 489 Bytes

Versions: 1

Compression:

Stored size: 489 Bytes

Contents

 class CreateHasStatesStates < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
  def change
    create_table :has_states_states do |t|
      t.string :type, null: false
      t.string :state_type
      t.string :status, null: false

      t.json :metadata, null: false, default: {}

      t.references :stateable, polymorphic: true, null: false

      t.timestamps

      t.index %i[type stateable_id]
      t.index %i[stateable_type stateable_id]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stateful_models-0.0.2 lib/generators/has_states/install/templates/create_has_states_states.rb.erb