@@ -174,15 +174,15 @@ executeMigration con tableName verbose name contents = do
174
174
when verbose $ putStrLn $ " Fail:\t " ++ name
175
175
return (MigrationError name)
176
176
where
177
- q = " insert into " <> Query tableName <> " (filename, checksum) values(?, ?)"
177
+ q = " insert into " `mappend` Query tableName `mappend` " (filename, checksum) values(?, ?)"
178
178
179
179
-- | Initializes the database schema with a helper table containing
180
180
-- meta-information about executed migrations.
181
181
initializeSchema :: Connection -> BS. ByteString -> Bool -> IO ()
182
182
initializeSchema con tableName verbose = do
183
183
when verbose $ putStrLn " Initializing schema"
184
184
void $ execute_ con $ mconcat
185
- [ " create table if not exists " <> Query tableName <> " "
185
+ [ " create table if not exists " `mappend` Query tableName `mappend` " "
186
186
, " ( filename varchar(512) not null"
187
187
, " , checksum varchar(32) not null"
188
188
, " , executed_at timestamp without time zone not null default now() "
@@ -207,7 +207,7 @@ executeValidation con tableName' verbose cmd =
207
207
MigrationInitialization ->
208
208
existsTable con tableName >>= \ r -> return $ if r
209
209
then MigrationSuccess
210
- else MigrationError $ " No such table: " <> tableName
210
+ else MigrationError $ " No such table: " `mappend` tableName
211
211
MigrationDirectory path ->
212
212
scriptsInDirectory path >>= goScripts path
213
213
MigrationScript name contents ->
@@ -250,7 +250,7 @@ checkScript con tableName name checksum =
250
250
return (ScriptModified actualChecksum)
251
251
where
252
252
q = mconcat
253
- [ " select checksum from " <> Query tableName <> " "
253
+ [ " select checksum from " `mappend` Query tableName `mappend` " "
254
254
, " where filename = ? limit 1"
255
255
]
256
256
@@ -348,7 +348,7 @@ getMigrations' :: Connection -> BS.ByteString -> IO [SchemaMigration]
348
348
getMigrations' con tableName = query_ con q
349
349
where q = mconcat
350
350
[ " select filename, checksum, executed_at "
351
- , " from " <> Query tableName <> " order by executed_at asc"
351
+ , " from " `mappend` Query tableName `mappend` " order by executed_at asc"
352
352
]
353
353
354
354
-- | A product type representing a single, executed 'SchemaMigration'.
0 commit comments