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