mirror of
https://github.com/ryankazokas/turbovault-app.git
synced 2026-04-16 22:12:53 +00:00
23 lines
793 B
Ruby
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
|