X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTSN%2FXML%2FScores.hs;h=858e62bc1a6d53ca50301e21de5e120eb4d561bb;hb=073bbfba4165d4c01d29daaa7523c35c6cc7d114;hp=f0ce6dea8373a18a3cd5cfeaf2b8f522924889e6;hpb=ddb77c32ec8d5d76b10a5ea642810595a408b82f;p=dead%2Fhtsn-import.git diff --git a/src/TSN/XML/Scores.hs b/src/TSN/XML/Scores.hs index f0ce6de..858e62b 100644 --- a/src/TSN/XML/Scores.hs +++ b/src/TSN/XML/Scores.hs @@ -32,11 +32,9 @@ import Database.Groundhog ( countAll, deleteAll, insert_, - migrate, - runMigration, - silentMigrationLogger ) + migrate ) import Database.Groundhog.Core ( DefaultKey ) -import Database.Groundhog.Generic ( runDbConn ) +import Database.Groundhog.Generic ( runDbConn, runMigrationSilent ) import Database.Groundhog.Sqlite ( withSqliteConn ) import Database.Groundhog.TH ( groundhog, @@ -63,7 +61,7 @@ import TSN.Codegen ( tsn_codegen_config ) import TSN.Database ( insert_or_select ) import TSN.DbImport ( DbImport(..), ImportResult(..), run_dbmigrate ) import TSN.Location ( Location(..), pickle_location ) -import TSN.Picklers ( xp_time_stamp ) +import TSN.Picklers ( xp_attr_option, xp_time_stamp ) import TSN.Team ( FromXmlFkTeams(..), HTeam(..), @@ -446,7 +444,7 @@ pickle_status :: PU ScoreGameStatus pickle_status = xpElem "status" $ xpWrap (from_tuple, to_tuple') $ - xpTriple (xpAttr "numeral" $ xpOption xpInt) + xpTriple (xpAttr "numeral" xp_attr_option) (xpOption $ xpAttr "type" $ xpOption xpText) xpText where @@ -629,7 +627,7 @@ test_on_delete_cascade = testGroup "cascading delete tests" let d = undefined :: ScoreGame let e = undefined :: Score_Location actual <- withSqliteConn ":memory:" $ runDbConn $ do - runMigration silentMigrationLogger $ do + runMigrationSilent $ do migrate a migrate b migrate c