mirror of
https://github.com/ryankazokas/turbovault-app.git
synced 2026-04-16 22:12:53 +00:00
14 lines
401 B
Ruby
14 lines
401 B
Ruby
class CreateCollectionGames < ActiveRecord::Migration[8.1]
|
|
def change
|
|
create_table :collection_games do |t|
|
|
t.references :collection, null: false, foreign_key: true, index: true
|
|
t.references :game, null: false, foreign_key: true, index: true
|
|
t.integer :position
|
|
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :collection_games, [ :collection_id, :game_id ], unique: true
|
|
end
|
|
end
|