]> gitweb.michael.orlitzky.com - dead/htsn-import.git/blobdiff - src/TSN/XML/Weather.hs
Replace all raw DELETE queries with deleteAll.
[dead/htsn-import.git] / src / TSN / XML / Weather.hs
index 03bb83d51c3ac3d45dbf9b2f5f974f5968f1d60b..bda29ee2541005efb4ca1eaedcccf77d1231d201 100644 (file)
@@ -26,7 +26,7 @@ import Data.Time ( UTCTime )
 import Data.Tuple.Curry ( uncurryN )
 import Database.Groundhog (
   countAll,
-  executeRaw,
+  deleteAll,
   migrate,
   runMigration,
   silentMigrationLogger )
@@ -412,8 +412,7 @@ test_on_delete_cascade =
                   migrate b
                   migrate c
                 _ <- dbimport weather
-                -- No idea how 'delete' works, so do this instead.
-                executeRaw False "DELETE FROM weather;" []
+                deleteAll a
                 count_a <- countAll a
                 count_b <- countAll b
                 count_c <- countAll c