X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTSN%2FXML%2FInjuries.hs;h=6ae9118ed7bfdba3084275d0f5d3636f928f7258;hb=fa27649ae583f6bdc20c54db4fc8f38a382a536c;hp=af1bc377466d078e71dff41cd73da393d4840200;hpb=19543bcbbb94ae3e153c1a5212ae202c49331478;p=dead%2Fhtsn-import.git diff --git a/src/TSN/XML/Injuries.hs b/src/TSN/XML/Injuries.hs index af1bc37..6ae9118 100644 --- a/src/TSN/XML/Injuries.hs +++ b/src/TSN/XML/Injuries.hs @@ -32,7 +32,7 @@ import Data.Time ( UTCTime ) import Data.Typeable ( Typeable ) import Database.Groundhog ( countAll, - executeRaw, + deleteAll, migrate, runMigration, silentMigrationLogger ) @@ -346,8 +346,7 @@ test_on_delete_cascade = migrate a migrate b _ <- dbimport inj - -- No idea how 'delete' works, so do this instead. - executeRaw False "DELETE FROM injuries;" [] + deleteAll a count_a <- countAll a count_b <- countAll b return $ count_a + count_b