1
0

20220824233535_create_status_trends.rb 480 B

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