20171119172437_create_admin_action_logs.rb 475 B

1234567891011121314
  1. # frozen_string_literal: true
  2. class CreateAdminActionLogs < ActiveRecord::Migration[5.2]
  3. def change
  4. create_table :admin_action_logs do |t|
  5. t.belongs_to :account, foreign_key: { on_delete: :cascade }
  6. t.string :action, null: false, default: ''
  7. t.references :target, polymorphic: true, index: { name: 'index_admin_action_logs_on_target_type_and_target_id' }
  8. t.text :recorded_changes, null: false, default: ''
  9. t.timestamps
  10. end
  11. end
  12. end