X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTSN%2FXML%2FInjuries.hs;h=1d1d3149638e72abce975d50983fb195a8028aff;hb=cb5fd814ce4dbb761ebbff4771f16d97b1910173;hp=af1bc377466d078e71dff41cd73da393d4840200;hpb=a0853ebe00e630b7d50f97949d4dd45c602bd454;p=dead%2Fhtsn-import.git diff --git a/src/TSN/XML/Injuries.hs b/src/TSN/XML/Injuries.hs index af1bc37..1d1d314 100644 --- a/src/TSN/XML/Injuries.hs +++ b/src/TSN/XML/Injuries.hs @@ -3,7 +3,6 @@ {-# LANGUAGE GADTs #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} @@ -32,7 +31,7 @@ import Data.Time ( UTCTime ) import Data.Typeable ( Typeable ) import Database.Groundhog ( countAll, - executeRaw, + deleteAll, migrate, runMigration, silentMigrationLogger ) @@ -346,8 +345,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