]> gitweb.michael.orlitzky.com - dead/htsn-import.git/commitdiff
Make the team rotation number optional in TSN.XML.EarlyLine.
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 29 Oct 2014 01:29:22 +0000 (21:29 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 29 Oct 2014 01:29:22 +0000 (21:29 -0400)
Update the earlylineXML dbschema diagram.

doc/dbschema/earlylineXML.png
src/TSN/XML/EarlyLine.hs

index 65b3cc70e6d55f0a7a0bdd973335d038dfb5bc72..b7608828562b8209ded139f5288f53eb40bb456f 100644 (file)
Binary files a/doc/dbschema/earlylineXML.png and b/doc/dbschema/earlylineXML.png differ
index b0d118d046f0905134ad9c91324188b3d55d3103..71379f9759f905b47c71a7f57303e5c8f5120b9e 100644 (file)
@@ -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)