1
0

20190914202517_create_account_migrations.rb 420 B

123456789101112
  1. class CreateAccountMigrations < ActiveRecord::Migration[5.2]
  2. def change
  3. create_table :account_migrations do |t|
  4. t.belongs_to :account, foreign_key: { on_delete: :cascade }
  5. t.string :acct, null: false, default: ''
  6. t.bigint :followers_count, null: false, default: 0
  7. t.belongs_to :target_account, foreign_key: { to_table: :accounts, on_delete: :nullify }
  8. t.timestamps
  9. end
  10. end
  11. end