20190203180359_create_featured_tags.rb 363 B

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