diff --git a/resources/migrations/20250312151923-create-game.up.sql b/resources/migrations/20250312151923-create-game.up.sql index 3e3105c..8ba5ee1 100644 --- a/resources/migrations/20250312151923-create-game.up.sql +++ b/resources/migrations/20250312151923-create-game.up.sql @@ -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, diff --git a/resources/migrations/20250312151928-create-players.up.sql b/resources/migrations/20250312151928-create-players.up.sql index b4b77d8..a92f5ff 100644 --- a/resources/migrations/20250312151928-create-players.up.sql +++ b/resources/migrations/20250312151928-create-players.up.sql @@ -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) diff --git a/src/com/score_the_pigs/middleware.clj b/src/com/score_the_pigs/middleware.clj index b370bf1..74e1dae 100644 --- a/src/com/score_the_pigs/middleware.clj +++ b/src/com/score_the_pigs/middleware.clj @@ -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))))