13 lines
319 B
Ruby
13 lines
319 B
Ruby
# frozen_string_literal: true
|
|
|
|
class CreatePlayers < ActiveRecord::Migration[7.1]
|
|
def change
|
|
create_table :players, primary_key: [ :user_id, :table_id ] do |t|
|
|
t.belongs_to :user, null: false, foreign_key: true
|
|
t.belongs_to :table, null: false, foreign_key: true
|
|
|
|
t.timestamps
|
|
end
|
|
end
|
|
end
|