Files
turbovault-app/db/migrate/20260328200307_create_igdb_match_suggestions.rb
2026-03-28 19:24:29 -04:00

23 lines
793 B
Ruby

class CreateIgdbMatchSuggestions < ActiveRecord::Migration[8.1]
def change
create_table :igdb_match_suggestions do |t|
t.references :game, null: false, foreign_key: true, index: true
t.references :igdb_game, foreign_key: true, index: true
t.bigint :igdb_id, null: false
t.string :igdb_name, null: false
t.string :igdb_slug
t.string :igdb_cover_url
t.date :igdb_release_date
t.string :igdb_platform_name
t.decimal :confidence_score, precision: 5, scale: 2
t.string :status, default: 'pending', null: false # pending, approved, rejected
t.datetime :reviewed_at
t.timestamps
end
add_index :igdb_match_suggestions, :status
add_index :igdb_match_suggestions, [ :game_id, :igdb_id ], unique: true
end
end