]> gitweb.michael.orlitzky.com - dead/htsn-import.git/commitdiff
Make the Odds team rotation numbers optional.
authorMichael Orlitzky <michael@orlitzky.com>
Sat, 5 Jul 2014 14:51:24 +0000 (10:51 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sat, 5 Jul 2014 14:51:24 +0000 (10:51 -0400)
Update the Odds dbschema diagram.

doc/dbschema/Odds_XML.png
src/TSN/XML/Odds.hs

index 63f822c9d616d15e4297f4539220a1b3953c6322..934d275b608b8a6a5b3ccb7974321c328668ed26 100644 (file)
Binary files a/doc/dbschema/Odds_XML.png and b/doc/dbschema/Odds_XML.png differ
index 4ca64754a41eac1e320a5e45eea569f7dee40c03..934c3d340508f89a3d0c40b770ce49c3fd9e975d 100644 (file)
@@ -166,7 +166,7 @@ data OddsGameHomeTeamXml =
                                         --   so we ignore the probable
                                         --   upper bound of three
                                         --   characters.
-    xml_home_team_rotation_number :: Int,
+    xml_home_team_rotation_number :: Maybe Int,
     xml_home_team_abbr            :: String,
     xml_home_team_name            :: String,
     xml_home_team_starter         :: Maybe (Int, String), -- ^ (id, name)
@@ -209,7 +209,7 @@ data OddsGameAwayTeamXml =
                                         --   on lengthless text fields, so
                                         --   we ignore the probable upper
                                         --   bound of three characters
-    xml_away_team_rotation_number :: Int,
+    xml_away_team_rotation_number :: Maybe Int,
     xml_away_team_abbr            :: String,
     xml_away_team_name            :: String,
     xml_away_team_starter         :: Maybe (Int, String), -- ^ (id, name)
@@ -284,8 +284,8 @@ data OddsGame =
     db_home_team_id      :: DefaultKey Team,
     db_game_id           :: Int,
     db_game_time         :: UTCTime, -- ^ Contains both the date and time.
-    db_away_team_rotation_number :: Int,
-    db_home_team_rotation_number :: Int,
+    db_away_team_rotation_number :: Maybe Int,
+    db_home_team_rotation_number :: Maybe Int,
     db_away_team_starter_id :: Maybe Int,
     db_away_team_starter_name :: Maybe String,
     db_home_team_starter_id :: Maybe Int,
@@ -619,7 +619,7 @@ pickle_home_team =
     xpWrap (from_tuple, to_tuple) $
       xp6Tuple
         (xpElem "HomeTeamID" xpText)
-        (xpElem "HomeRotationNumber" xpInt)
+        (xpElem "HomeRotationNumber" (xpOption xpInt))
         (xpElem "HomeAbbr" xpText)
         (xpElem "HomeTeamName" xpText)
         (-- This is an ugly way to get both the HStarter ID attribute
@@ -645,7 +645,7 @@ pickle_away_team =
     xpWrap (from_tuple, to_tuple) $
       xp6Tuple
         (xpElem "AwayTeamID" xpText)
-        (xpElem "AwayRotationNumber" xpInt)
+        (xpElem "AwayRotationNumber" (xpOption xpInt))
         (xpElem "AwayAbbr" xpText)
         (xpElem "AwayTeamName" xpText)
         (-- This is an ugly way to get both the AStarter ID attribute