Sha256: 4b3c6aa7b174bca0455869334683012443e471eb557ca30471f5c13db4c9f49c

Contents?: true

Size: 446 Bytes

Versions: 3

Compression:

Stored size: 446 Bytes

Contents

 class CreateHasStatesStates < ActiveRecord::Migration[8.0]
  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

3 entries across 2 versions & 1 rubygems

Version Path
stateful_models-0.0.3 spec/dummy/db/migrate/20241223212128_create_has_states_states.rb
stateful_models-0.0.2 spec/dummy/db/migrate/20241223212128_create_has_states_states.rb
stateful_models-0.0.2 spec/generators/tmp/db/migrate/20241223213845_create_has_states_states.rb