From e027789fbdb5c14d80961b165e3d9e59565b7155 Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Thu, 1 Sep 2016 17:36:39 +0000 Subject: [PATCH] Migration: When escaping names, forgot to surround then with "s --- src/Database/Persist/Schema/PostgreSQL.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Database/Persist/Schema/PostgreSQL.hs b/src/Database/Persist/Schema/PostgreSQL.hs index 17d904a..f79854c 100644 --- a/src/Database/Persist/Schema/PostgreSQL.hs +++ b/src/Database/Persist/Schema/PostgreSQL.hs @@ -36,7 +36,7 @@ quoteName = let f '\0' _ = error "quoteName found \\0 character, invalid in names" f '"' cs = '"' : '"' : cs f c cs = c : cs - in T.pack . T.foldr f [] + in T.pack . ('"' :) . T.foldr f "\"" table2sql :: TableName -> Text table2sql = quoteName . unTableName