don't need to lowercase if we ask sqlite to NOCASE

This commit is contained in:
Luciano Laratelli 2025-04-09 11:20:23 -04:00
parent 07ff15574e
commit 71e9a712ed
3 changed files with 2 additions and 4 deletions

View file

@ -1,5 +1,5 @@
CREATE TABLE IF NOT EXISTS game (
code text PRIMARY KEY,
code text PRIMARY KEY COLLATE NOCASE,
current_player integer,
player_count integer NOT NULL,
scoring_option text NOT NULL,

View file

@ -3,7 +3,7 @@ CREATE TABLE IF NOT EXISTS player (
game_score INTEGER NOT NULL,
round_score INTEGER NOT NULL,
name text NOT NULL,
game_code text NOT NULL,
game_code text NOT NULL COLLATE NOCASE,
play_order integer NOT NULL,
last_move integer,
FOREIGN KEY (game_code) REFERENCES game(code)

View file

@ -17,8 +17,6 @@
(dissoc :__anti-forgery-token :game-code :players)
(update-vals csk/->kebab-case-keyword))
req (-> req
(update-in [:path-params :code] #(when % (str/lower-case %)))
(update-in [:params :game-code] #(when % (str/lower-case %)))
(update :params merge unknown-params))]
(handler req))))