20190203180359_create_featured_tags.rb 394 B

1234567891011121314
  1. # frozen_string_literal: true
  2. class CreateFeaturedTags < ActiveRecord::Migration[5.2]
  3. def change
  4. create_table :featured_tags do |t|
  5. t.references :account, foreign_key: { on_delete: :cascade }
  6. t.references :tag, foreign_key: { on_delete: :cascade }
  7. t.bigint :statuses_count, default: 0, null: false
  8. t.datetime :last_status_at
  9. t.timestamps
  10. end
  11. end
  12. end