From 39791b4552b605fe60d03a5e98c5533bd741b729 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 27 Nov 2025 15:21:18 -0500 Subject: Fix SQL query and add simple migration test --- Omni/Task/Core.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Omni/Task/Core.hs') diff --git a/Omni/Task/Core.hs b/Omni/Task/Core.hs index 4eac9b5..63bc533 100644 --- a/Omni/Task/Core.hs +++ b/Omni/Task/Core.hs @@ -437,7 +437,8 @@ migrateTable conn tableName expectedCols = do -- | Get list of column names for a table using PRAGMA table_info getTableColumns :: SQL.Connection -> Text -> IO [Text] getTableColumns conn tableName = do - rows <- SQL.query conn "PRAGMA table_info(?)" (SQL.Only tableName) :: IO [(Int, Text, Text, Int, Maybe Text, Int)] + let query = SQL.Query <| "PRAGMA table_info(" <> tableName <> ")" + rows <- SQL.query_ conn query :: IO [(Int, Text, Text, Int, Maybe Text, Int)] pure [colName | (_, colName, _, _, _, _) <- rows] -- | Add a column to a table -- cgit v1.2.3