From: Michael Orlitzky Date: Tue, 13 Jan 2015 07:25:14 +0000 (-0500) Subject: Update all silent migrations for groundhog-0.7. X-Git-Tag: 0.2.1~3 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=32147474ba5c91452eeb532381f63e88c257a982;p=dead%2Fhtsn-import.git Update all silent migrations for groundhog-0.7. --- diff --git a/src/TSN/XML/AutoRacingDriverList.hs b/src/TSN/XML/AutoRacingDriverList.hs index 453986e..482c1f3 100644 --- a/src/TSN/XML/AutoRacingDriverList.hs +++ b/src/TSN/XML/AutoRacingDriverList.hs @@ -29,11 +29,9 @@ import qualified Data.Vector.HFixed as H ( HVector, cons, convert ) import Database.Groundhog ( countAll, deleteAll, - 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, @@ -354,7 +352,7 @@ test_on_delete_cascade = testGroup "cascading delete tests" let b = undefined :: AutoRacingDriverListListing actual <- withSqliteConn ":memory:" $ runDbConn $ do - runMigration silentMigrationLogger $ do + runMigrationSilent $ do migrate a migrate b _ <- dbimport results diff --git a/src/TSN/XML/AutoRacingResults.hs b/src/TSN/XML/AutoRacingResults.hs index e540e06..e51fff8 100644 --- a/src/TSN/XML/AutoRacingResults.hs +++ b/src/TSN/XML/AutoRacingResults.hs @@ -33,11 +33,9 @@ import qualified Data.Vector.HFixed as H ( HVector, cons, convert ) import Database.Groundhog ( countAll, deleteAll, - 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, @@ -664,7 +662,7 @@ test_on_delete_cascade = testGroup "cascading delete tests" let c = undefined :: AutoRacingResultsRaceInformation actual <- withSqliteConn ":memory:" $ runDbConn $ do - runMigration silentMigrationLogger $ do + runMigrationSilent $ do migrate a migrate b migrate c diff --git a/src/TSN/XML/AutoRacingSchedule.hs b/src/TSN/XML/AutoRacingSchedule.hs index 39cfeb9..64132bc 100644 --- a/src/TSN/XML/AutoRacingSchedule.hs +++ b/src/TSN/XML/AutoRacingSchedule.hs @@ -32,11 +32,9 @@ import qualified Data.Vector.HFixed as H ( HVector, cons, convert ) import Database.Groundhog ( countAll, deleteAll, - 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, @@ -545,7 +543,7 @@ test_on_delete_cascade = testGroup "cascading delete tests" let c = undefined :: AutoRacingScheduleListingRaceResultRaceResultListing actual <- withSqliteConn ":memory:" $ runDbConn $ do - runMigration silentMigrationLogger $ do + runMigrationSilent $ do migrate a migrate b migrate c diff --git a/src/TSN/XML/EarlyLine.hs b/src/TSN/XML/EarlyLine.hs index 5ec81a3..796418f 100644 --- a/src/TSN/XML/EarlyLine.hs +++ b/src/TSN/XML/EarlyLine.hs @@ -42,11 +42,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, @@ -647,7 +645,7 @@ test_on_delete_cascade = testGroup "cascading delete tests" let b = undefined :: EarlyLineGame actual <- withSqliteConn ":memory:" $ runDbConn $ do - runMigration silentMigrationLogger $ do + runMigrationSilent $ do migrate a migrate b _ <- dbimport results diff --git a/src/TSN/XML/GameInfo.hs b/src/TSN/XML/GameInfo.hs index d165c19..3062f5a 100644 --- a/src/TSN/XML/GameInfo.hs +++ b/src/TSN/XML/GameInfo.hs @@ -26,10 +26,8 @@ import Data.Time.Clock ( UTCTime ) import Database.Groundhog ( countAll, insert_, - migrate, - runMigration, - silentMigrationLogger ) -import Database.Groundhog.Generic ( runDbConn ) + migrate ) +import Database.Groundhog.Generic ( runDbConn, runMigrationSilent ) import Database.Groundhog.Sqlite ( withSqliteConn ) import Database.Groundhog.TH ( defaultCodegenConfig, @@ -234,7 +232,7 @@ test_dbimport_succeeds = testCase "dbimport succeeds" $ do xmltrees <- mapM unsafe_read_document game_info_test_files let msgs = rights $ map (parse_xml "dummy") xmltrees actual <- withSqliteConn ":memory:" $ runDbConn $ do - runMigration silentMigrationLogger $ + runMigrationSilent $ migrate (undefined :: GameInfo) mapM_ dbimport msgs countAll (undefined :: GameInfo) diff --git a/src/TSN/XML/Injuries.hs b/src/TSN/XML/Injuries.hs index 85b7bee..2cb1487 100644 --- a/src/TSN/XML/Injuries.hs +++ b/src/TSN/XML/Injuries.hs @@ -34,11 +34,9 @@ import qualified Data.Vector.HFixed as H ( HVector, cons, convert ) import Database.Groundhog ( countAll, deleteAll, - migrate, - runMigration, - silentMigrationLogger ) + migrate ) import Database.Groundhog.Core ( DefaultKey ) -import Database.Groundhog.Generic ( runDbConn ) +import Database.Groundhog.Generic ( runDbConn, runMigrationSilent ) import Database.Groundhog.TH ( groundhog, mkPersist ) @@ -354,7 +352,7 @@ test_on_delete_cascade = let a = undefined :: Injuries let b = undefined :: InjuriesListing actual <- withSqliteConn ":memory:" $ runDbConn $ do - runMigration silentMigrationLogger $ do + runMigrationSilent $ do migrate a migrate b _ <- dbimport inj diff --git a/src/TSN/XML/InjuriesDetail.hs b/src/TSN/XML/InjuriesDetail.hs index 3f1ba16..c2f189b 100644 --- a/src/TSN/XML/InjuriesDetail.hs +++ b/src/TSN/XML/InjuriesDetail.hs @@ -37,10 +37,8 @@ import Database.Groundhog ( DefaultKey, countAll, deleteAll, - migrate, - runMigration, - silentMigrationLogger ) -import Database.Groundhog.Generic ( runDbConn ) + migrate ) +import Database.Groundhog.Generic ( runDbConn, runMigrationSilent ) import Database.Groundhog.Sqlite ( withSqliteConn ) import Database.Groundhog.TH ( groundhog, @@ -470,7 +468,7 @@ test_on_delete_cascade = testGroup "cascading delete tests" let b = undefined :: InjuriesDetailListing let c = undefined :: InjuriesDetailListingPlayerListing actual <- withSqliteConn ":memory:" $ runDbConn $ do - runMigration silentMigrationLogger $ do + runMigrationSilent $ do migrate a migrate b migrate c diff --git a/src/TSN/XML/JFile.hs b/src/TSN/XML/JFile.hs index d434220..80d13fe 100644 --- a/src/TSN/XML/JFile.hs +++ b/src/TSN/XML/JFile.hs @@ -32,11 +32,9 @@ import qualified Data.Vector.HFixed as H ( HVector, convert ) import Database.Groundhog ( countAll, deleteAll, - 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, @@ -663,7 +661,7 @@ test_on_delete_cascade = testGroup "cascading delete tests" let c = undefined :: JFileGame actual <- withSqliteConn ":memory:" $ runDbConn $ do - runMigration silentMigrationLogger $ do + runMigrationSilent $ do migrate a migrate b migrate c diff --git a/src/TSN/XML/MLBEarlyLine.hs b/src/TSN/XML/MLBEarlyLine.hs index fc90483..71bb8bc 100644 --- a/src/TSN/XML/MLBEarlyLine.hs +++ b/src/TSN/XML/MLBEarlyLine.hs @@ -47,10 +47,8 @@ where import Database.Groundhog ( countAll, deleteAll, - migrate, - runMigration, - silentMigrationLogger ) -import Database.Groundhog.Generic ( runDbConn ) + migrate ) +import Database.Groundhog.Generic ( runDbConn, runMigrationSilent ) import Database.Groundhog.Sqlite ( withSqliteConn ) import Test.Tasty ( TestTree, testGroup ) import Test.Tasty.HUnit ( (@?=), testCase ) @@ -124,7 +122,7 @@ test_on_delete_cascade = let b = undefined :: EarlyLineGame actual <- withSqliteConn ":memory:" $ runDbConn $ do - runMigration silentMigrationLogger $ do + runMigrationSilent $ do migrate a migrate b _ <- dbimport results diff --git a/src/TSN/XML/News.hs b/src/TSN/XML/News.hs index 3828800..645d1da 100644 --- a/src/TSN/XML/News.hs +++ b/src/TSN/XML/News.hs @@ -33,11 +33,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, @@ -545,7 +543,7 @@ test_on_delete_cascade = testGroup "cascading delete tests" let d = undefined :: News_Team let e = undefined :: News_Location actual <- withSqliteConn ":memory:" $ runDbConn $ do - runMigration silentMigrationLogger $ do + runMigrationSilent $ do migrate a migrate b migrate c diff --git a/src/TSN/XML/Odds.hs b/src/TSN/XML/Odds.hs index 6e47380..bedb688 100644 --- a/src/TSN/XML/Odds.hs +++ b/src/TSN/XML/Odds.hs @@ -37,11 +37,9 @@ import Database.Groundhog ( deleteAll, insert_, migrate, - runMigration, - silentMigrationLogger, update ) 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, @@ -897,7 +895,7 @@ test_on_delete_cascade = testGroup "cascading delete tests" let d = undefined :: OddsGame let e = undefined :: OddsGameLine actual <- withSqliteConn ":memory:" $ runDbConn $ do - runMigration silentMigrationLogger $ do + runMigrationSilent $ do migrate a migrate b migrate c diff --git a/src/TSN/XML/ScheduleChanges.hs b/src/TSN/XML/ScheduleChanges.hs index f1cb907..fd5641c 100644 --- a/src/TSN/XML/ScheduleChanges.hs +++ b/src/TSN/XML/ScheduleChanges.hs @@ -31,11 +31,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, @@ -504,7 +502,7 @@ test_on_delete_cascade = let c = undefined :: ScheduleChangesListing actual <- withSqliteConn ":memory:" $ runDbConn $ do - runMigration silentMigrationLogger $ do + runMigrationSilent $ do migrate a migrate b migrate c diff --git a/src/TSN/XML/Scores.hs b/src/TSN/XML/Scores.hs index f0ce6de..76bf563 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, @@ -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 diff --git a/src/TSN/XML/SportInfo.hs b/src/TSN/XML/SportInfo.hs index 1fcd3ab..5db69b9 100644 --- a/src/TSN/XML/SportInfo.hs +++ b/src/TSN/XML/SportInfo.hs @@ -30,10 +30,8 @@ import Data.Time.Clock ( UTCTime ) import Database.Groundhog ( countAll, insert_, - migrate, - runMigration, - silentMigrationLogger ) -import Database.Groundhog.Generic ( runDbConn ) + migrate ) +import Database.Groundhog.Generic ( runDbConn, runMigrationSilent ) import Database.Groundhog.Sqlite ( withSqliteConn ) import Database.Groundhog.TH ( defaultCodegenConfig, @@ -335,7 +333,7 @@ test_dbimport_succeeds = testCase "dbimport succeeds" $ do xmltrees <- mapM unsafe_read_document sport_info_test_files let msgs = rights $ map (parse_xml "dummy") xmltrees actual <- withSqliteConn ":memory:" $ runDbConn $ do - runMigration silentMigrationLogger $ + runMigrationSilent $ migrate (undefined :: SportInfo) mapM_ dbimport msgs countAll (undefined :: SportInfo) diff --git a/src/TSN/XML/Weather.hs b/src/TSN/XML/Weather.hs index 4c95566..2f3a3ca 100644 --- a/src/TSN/XML/Weather.hs +++ b/src/TSN/XML/Weather.hs @@ -33,11 +33,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, @@ -709,7 +707,7 @@ test_on_delete_cascade = testGroup "cascading delete tests" let c = undefined :: WeatherForecastListing let d = undefined :: WeatherDetailedWeatherListingItem actual <- withSqliteConn ":memory:" $ runDbConn $ do - runMigration silentMigrationLogger $ do + runMigrationSilent $ do migrate a migrate b migrate c