Sha256: 4ebc46e50ef2e14ee88c548a9595a9e1b90e2aa20bafd41130b125a430f361f3

Contents?: true

Size: 402 Bytes

Versions: 1

Compression:

Stored size: 402 Bytes

Contents

class CreateActions < ActiveRecord::Migration[5.0]
  def change
    create_table :actions do |t|
      t.integer :subject_id
      t.string :subject_type
      t.string :action_type
      t.string :target_type
      t.integer :target_id

      t.timestamps
    end

    add_index :actions, %w[subject_id subject_type action_type]
    add_index :actions, %w[target_id target_type action_type]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
action_plugin-0.3.0 db/migrate/create_actions.rb