20220824233535_create_status_trends.rb 511 B

1234567891011121314
  1. # frozen_string_literal: true
  2. class CreateStatusTrends < ActiveRecord::Migration[6.1]
  3. def change
  4. create_table :status_trends do |t|
  5. t.references :status, null: false, foreign_key: { on_delete: :cascade }, index: { unique: true }
  6. t.references :account, null: false, foreign_key: { on_delete: :cascade }
  7. t.float :score, null: false, default: 0
  8. t.integer :rank, null: false, default: 0
  9. t.boolean :allowed, null: false, default: false
  10. t.string :language
  11. end
  12. end
  13. end