フロントエンドプレイアブル
This commit is contained in:
16
db/migrate/20260211013256_create_participants.rb
Normal file
16
db/migrate/20260211013256_create_participants.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
class CreateParticipants < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
create_table :participants do |t|
|
||||
t.references :user, null: false, foreign_key: true
|
||||
t.references :game, null: false, foreign_key: true
|
||||
t.string :power, null: true
|
||||
t.boolean :orders_submitted, default: false, null: false
|
||||
t.boolean :is_administrator, default: false, null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :participants, [:user_id, :game_id], unique: true
|
||||
add_index :participants, [:game_id, :power], unique: true, where: "power IS NOT NULL"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user