このコミットが含まれているのは:
@@ -0,0 +1,18 @@
|
||||
class CreateGekanatorGames < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :gekanator_games do |t|
|
||||
t.references :user, foreign_key: true
|
||||
t.references :guessed_post, null: false, foreign_key: { to_table: :posts }
|
||||
t.references :correct_post, foreign_key: { to_table: :posts }
|
||||
t.boolean :won, null: false
|
||||
t.integer :question_count, null: false
|
||||
t.json :answers, null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_check_constraint :gekanator_games,
|
||||
'question_count >= 0',
|
||||
name: 'chk_gekanator_games_question_count_nonnegative'
|
||||
end
|
||||
end
|
||||
新しい課題から参照
ユーザをブロックする