- 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>
288 lines
No EOL
7.1 KiB
JSON
288 lines
No EOL
7.1 KiB
JSON
{
|
|
"id": "6de8c2ee-3634-455b-ba4b-372368fc2e66",
|
|
"prevId": "c68e2f59-3d1b-4fca-8443-17fe243e2919",
|
|
"version": "7",
|
|
"dialect": "postgresql",
|
|
"tables": {
|
|
"public.game_history": {
|
|
"name": "game_history",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"room_code": {
|
|
"name": "room_code",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"played_at": {
|
|
"name": "played_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"modes": {
|
|
"name": "modes",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"results": {
|
|
"name": "results",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.quiz_category": {
|
|
"name": "quiz_category",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"quiz_category_name_unique": {
|
|
"name": "quiz_category_name_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"name"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.quiz_played": {
|
|
"name": "quiz_played",
|
|
"schema": "",
|
|
"columns": {
|
|
"question_id": {
|
|
"name": "question_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"room_code": {
|
|
"name": "room_code",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"played_at": {
|
|
"name": "played_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"quiz_played_question_id_quiz_question_id_fk": {
|
|
"name": "quiz_played_question_id_quiz_question_id_fk",
|
|
"tableFrom": "quiz_played",
|
|
"tableTo": "quiz_question",
|
|
"columnsFrom": [
|
|
"question_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"quiz_played_question_id_room_code_pk": {
|
|
"name": "quiz_played_question_id_room_code_pk",
|
|
"columns": [
|
|
"question_id",
|
|
"room_code"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.quiz_question": {
|
|
"name": "quiz_question",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"category_id": {
|
|
"name": "category_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"format": {
|
|
"name": "format",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"prompt": {
|
|
"name": "prompt",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"difficulty": {
|
|
"name": "difficulty",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 1
|
|
},
|
|
"source": {
|
|
"name": "source",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"choices": {
|
|
"name": "choices",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"correct_index": {
|
|
"name": "correct_index",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"accepted_answers": {
|
|
"name": "accepted_answers",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"image_url": {
|
|
"name": "image_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"quiz_question_prompt_unique": {
|
|
"name": "quiz_question_prompt_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "prompt",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"where": "\"quiz_question\".\"format\" <> 'image_reveal'",
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"quiz_question_image_unique": {
|
|
"name": "quiz_question_image_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "image_url",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"where": "\"quiz_question\".\"image_url\" is not null",
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"quiz_question_category_id_quiz_category_id_fk": {
|
|
"name": "quiz_question_category_id_quiz_category_id_fk",
|
|
"tableFrom": "quiz_question",
|
|
"tableTo": "quiz_category",
|
|
"columnsFrom": [
|
|
"category_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
}
|
|
},
|
|
"enums": {},
|
|
"schemas": {},
|
|
"sequences": {},
|
|
"roles": {},
|
|
"policies": {},
|
|
"views": {},
|
|
"_meta": {
|
|
"columns": {},
|
|
"schemas": {},
|
|
"tables": {}
|
|
}
|
|
} |