From: Michael Orlitzky Date: Wed, 29 Oct 2014 01:29:22 +0000 (-0400) Subject: Make the team rotation number optional in TSN.XML.EarlyLine. X-Git-Tag: 0.2.1~78 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=3584cc9d62f48df2042fb29abeb9ef40933d9f2a;p=dead%2Fhtsn-import.git Make the team rotation number optional in TSN.XML.EarlyLine. Update the earlylineXML dbschema diagram. --- diff --git a/doc/dbschema/earlylineXML.png b/doc/dbschema/earlylineXML.png index 65b3cc7..b760882 100644 Binary files a/doc/dbschema/earlylineXML.png and b/doc/dbschema/earlylineXML.png differ diff --git a/src/TSN/XML/EarlyLine.hs b/src/TSN/XML/EarlyLine.hs index b0d118d..71379f9 100644 --- a/src/TSN/XML/EarlyLine.hs +++ b/src/TSN/XML/EarlyLine.hs @@ -250,7 +250,7 @@ data EarlyLineGameXml = -- data EarlyLineGameTeam = EarlyLineGameTeam { - db_rotation_number :: Int, + db_rotation_number :: Maybe Int, -- ^ Usually there but sometimes empty. db_line :: Maybe String, -- ^ Can be blank, a Double, or \"off\". db_team_name :: Maybe String, -- ^ NOT optional, see the data type docs. db_pitcher :: Maybe String -- ^ Optional in MLB_earlylineXML.dtd, @@ -281,7 +281,7 @@ data EarlyLineGameTeam = -- data EarlyLineGameTeamXml = EarlyLineGameTeamXml { - xml_rotation_number :: Int, + xml_rotation_number :: Maybe Int, xml_line_attr :: Maybe String, xml_team_name_attr :: Maybe String, xml_team_name_text :: Maybe String, @@ -548,7 +548,7 @@ pickle_home_team = xpElem "teamH" pickle_team pickle_team :: PU EarlyLineGameTeamXml pickle_team = xpWrap (from_tuple, to_tuple) $ - xp6Tuple (xpAttr "rotation" xpInt) + xp6Tuple (xpAttr "rotation" (xpOption xpInt)) (xpOption $ xpAttr "line" (xpOption xpText)) (xpOption $ xpAttr "name" xpText) (xpOption xpText)