- image_reveal display: larger, object-contain (whole image up to 58vh), no crop - image prompt optional in back-office (defaults to "Qui est-ce ?"), overridable - mixed mode reworked: select "Mixte" then toggle sub-modes (Quiz/Images/ Blindtest). Blindtest sub-mode locked under 3 players; mixed itself no longer needs 3. Server quiz pool formats derived from gameType + mixedModes. shared: MixMode + RoomSettings.mixedModes (default quiz+image). - DB: prompt uniqueness is now a partial index (excludes image_reveal) + unique index on image_url; lets many images share the generic prompt, dedup by URL. - seed: db:seed:images pulls Pokémon (PokéAPI) as image_reveal questions with official artwork (remote URL) + FR/EN accepted answers; idempotent by image_url. Verified: migration applied, Pokémon seed inserts FR+EN, image mode serves only image_reveal, all checks green (23 tests). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 lines
No EOL
405 B
SQL
3 lines
No EOL
405 B
SQL
ALTER TABLE "quiz_question" DROP CONSTRAINT "quiz_question_prompt_unique";--> statement-breakpoint
|
|
CREATE UNIQUE INDEX "quiz_question_prompt_unique" ON "quiz_question" USING btree ("prompt") WHERE "quiz_question"."format" <> 'image_reveal';--> statement-breakpoint
|
|
CREATE UNIQUE INDEX "quiz_question_image_unique" ON "quiz_question" USING btree ("image_url") WHERE "quiz_question"."image_url" is not null; |