From: Michael Orlitzky Date: Sat, 11 Jan 2014 23:42:59 +0000 (-0500) Subject: Use run_dbmigrate instead of runMigration... everywhere. X-Git-Tag: 0.0.1~95 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=c792c3bb79e83b5bb8d65984de51f2416b7a2d8e;p=dead%2Fhtsn-import.git Use run_dbmigrate instead of runMigration... everywhere. --- diff --git a/src/TSN/XML/Injuries.hs b/src/TSN/XML/Injuries.hs index 7ec0a4d..b1b7b22 100644 --- a/src/TSN/XML/Injuries.hs +++ b/src/TSN/XML/Injuries.hs @@ -22,9 +22,7 @@ where import Data.Data ( Data ) import Data.Typeable ( Typeable ) import Database.Groundhog ( - defaultMigrationLogger, - migrate, - runMigration ) + migrate ) import Database.Groundhog.TH ( defaultCodegenConfig, groundhog, @@ -48,7 +46,7 @@ import Text.XML.HXT.Core ( xpWrap ) -import TSN.DbImport ( DbImport(..), ImportResult(..) ) +import TSN.DbImport ( DbImport(..), ImportResult(..), run_dbmigrate ) import TSN.XmlImport ( XmlImport(..) ) import Xml ( FromXml(..), pickle_unpickle, unpickleable ) @@ -85,8 +83,7 @@ data Message = instance DbImport Message where dbimport msg = mapM_ insert_xml (listings msg) >> return ImportSucceeded - dbmigrate _ = - runMigration defaultMigrationLogger $ migrate (undefined :: Listing) + dbmigrate _ = run_dbmigrate $ migrate (undefined :: Listing) mkPersist defaultCodegenConfig [groundhog| - entity: Listing diff --git a/src/TSN/XML/InjuriesDetail.hs b/src/TSN/XML/InjuriesDetail.hs index a7a7da3..e26cd1c 100644 --- a/src/TSN/XML/InjuriesDetail.hs +++ b/src/TSN/XML/InjuriesDetail.hs @@ -25,9 +25,7 @@ where import Data.Time ( UTCTime ) import Data.Tuple.Curry ( uncurryN ) import Database.Groundhog ( - defaultMigrationLogger, - migrate, - runMigration ) + migrate ) import Database.Groundhog.TH ( defaultCodegenConfig, groundhog, @@ -49,7 +47,7 @@ import Text.XML.HXT.Core ( xpWrap ) import TSN.Picklers( xp_date, xp_team_id ) -import TSN.DbImport ( DbImport(..), ImportResult(..) ) +import TSN.DbImport ( DbImport(..), ImportResult(..), run_dbmigrate ) import TSN.XmlImport ( XmlImport(..) ) import Xml ( FromXml(..), pickle_unpickle, unpickleable ) @@ -98,8 +96,7 @@ instance DbImport Message where mapM_ insert_xml (concatMap player_listings $ listings msg) return ImportSucceeded - dbmigrate _ = - runMigration defaultMigrationLogger $ migrate (undefined :: PlayerListing) + dbmigrate _ = run_dbmigrate $ migrate (undefined :: PlayerListing) mkPersist defaultCodegenConfig [groundhog| - entity: PlayerListing diff --git a/src/TSN/XML/News.hs b/src/TSN/XML/News.hs index f962c9c..f799a52 100644 --- a/src/TSN/XML/News.hs +++ b/src/TSN/XML/News.hs @@ -21,10 +21,8 @@ import Data.List.Utils ( join, split ) import Data.Tuple.Curry ( uncurryN ) import Data.Typeable ( Typeable ) import Database.Groundhog ( - defaultMigrationLogger, insert_, - migrate, - runMigration ) + migrate ) import Database.Groundhog.Core ( DefaultKey ) import Database.Groundhog.TH ( defaultCodegenConfig, @@ -49,7 +47,7 @@ import Text.XML.HXT.Core ( import TSN.Codegen ( tsn_codegen_config, tsn_db_field_namer ) -- Used in a test -import TSN.DbImport ( DbImport(..), ImportResult(..) ) +import TSN.DbImport ( DbImport(..), ImportResult(..), run_dbmigrate ) import TSN.XmlImport ( XmlImport(..) ) import Xml ( FromXml(..), pickle_unpickle, unpickleable ) @@ -150,7 +148,7 @@ instance XmlImport Message instance DbImport Message where dbmigrate _ = - runMigration defaultMigrationLogger $ do + run_dbmigrate $ do migrate (undefined :: NewsTeam) migrate (undefined :: NewsLocation) migrate (undefined :: News)