-- name: CreateChatMessage :exec
INSERT INTO chat_messages (game_id, nickname, color, message, created_at)
VALUES (?, ?, ?, ?, ?);

-- name: GetChatMessages :many
SELECT * FROM chat_messages
WHERE game_id = ?
ORDER BY created_at DESC, id DESC
LIMIT 50;
