20221006061337_create_preview_card_trends.rb 499 B

12345678910111213
  1. # frozen_string_literal: true
  2. class CreatePreviewCardTrends < ActiveRecord::Migration[6.1]
  3. def change
  4. create_table :preview_card_trends do |t| # rubocop:disable Rails/CreateTableWithTimestamps
  5. t.references :preview_card, null: false, foreign_key: { on_delete: :cascade }, index: { unique: true }
  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