20181213184704_create_account_warnings.rb 438 B

1234567891011121314
  1. # frozen_string_literal: true
  2. class CreateAccountWarnings < ActiveRecord::Migration[5.2]
  3. def change
  4. create_table :account_warnings do |t|
  5. t.belongs_to :account, foreign_key: { on_delete: :nullify }
  6. t.belongs_to :target_account, foreign_key: { to_table: 'accounts', on_delete: :cascade }
  7. t.integer :action, null: false, default: 0
  8. t.text :text, null: false, default: ''
  9. t.timestamps
  10. end
  11. end
  12. end