tabletop-companion/db/migrate/20240529074949_create_playe...

13 lines
319 B
Ruby
Raw Permalink Normal View History

2024-05-29 08:09:58 +00:00
# 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