]> gitweb.michael.orlitzky.com - dead/htsn-import.git/commitdiff
Fix a bug in the AutoRacingResults template Haskell.
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 15 Jun 2014 02:52:25 +0000 (22:52 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 15 Jun 2014 02:52:25 +0000 (22:52 -0400)
Add the database schema diagram for AutoRacingResults.
Add AutoRacingResultsXML.dtd as a supported type in the documentation.

doc/TODO
doc/dbschema/AutoRacingResultsXML.png [new file with mode: 0644]
doc/man1/htsn-import.1
htsn-import.cabal
src/TSN/XML/AutoRacingResults.hs

index 5d2bb25ad89487d0d85b2c3031a1f04276ca1ca7..44ab2dc9173ce0b4aa702866fdf1079371ca87d7 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -10,7 +10,6 @@
    before "version one point oh." This list refers to an
    old proprietary implementation, sorry:
 
-     * AutoRacingResultsXML
      * jfilexml
      * Schedule_Changes_XML
      * SportInfoListing
diff --git a/doc/dbschema/AutoRacingResultsXML.png b/doc/dbschema/AutoRacingResultsXML.png
new file mode 100644 (file)
index 0000000..5365fe2
Binary files /dev/null and b/doc/dbschema/AutoRacingResultsXML.png differ
index 91bd43c74f0b91828a41667198819e1fb5697cf8..450ad7a9b9cbac19a0e2d1b71aadf83ff3e66ea6 100644 (file)
@@ -48,6 +48,8 @@ pickle/unpickle everything already, this should be impossible.
 The XML document types obtained from the feed are uniquely identified
 by their DTDs. We currently support documents with the following DTDs:
 .IP \[bu] 2
+AutoRacingResultsXML.dtd
+.IP \[bu]
 Auto_Racing_Schedule_XML.dtd
 .IP \[bu]
 Heartbeat.dtd
index d381b15bf986c9784a04399a9153cb0b0706c820..f264e30154ba338b076a22987b441b4fba487419 100644 (file)
@@ -17,6 +17,7 @@ extra-source-files:
   doc/TODO
   makefile
   schema/*.dtd
+  schemagen/AutoRacingResultsXML/*.xml
   schemagen/Auto_Racing_Schedule_XML/*.xml
   schemagen/Heartbeat/*.xml
   schemagen/injuriesxml/*.xml
index 96433ee0e7638efd31c257e61e812b12776c4970..bfc07d178b52c233cc691b19c2f3bab94a7aa3c8 100644 (file)
@@ -267,7 +267,7 @@ data MostLapsLeading =
 data AutoRacingResultsRaceInformation =
   AutoRacingResultsRaceInformation {
     -- Note the apostrophe to disambiguate it from the
-    -- AutoRacingResultsListing filed.
+    -- AutoRacingResultsListing field.
     db_auto_racing_results_id' :: DefaultKey AutoRacingResults,
     db_track_length :: Double,
     db_track_length_kph :: Double,
@@ -391,13 +391,16 @@ mkPersist tsn_codegen_config [groundhog|
           reference:
             onDelete: cascade
 
-
+# Note the apostrophe in the foreign key. This is to disambiguate
+# it from the AutoRacingResultsListing foreign key of the same name.
+# We strip it out of the dbName.
 - entity: AutoRacingResultsRaceInformation
   dbName: auto_racing_results_race_information
   constructors:
     - name: AutoRacingResultsRaceInformation
       fields:
         - name: db_auto_racing_results_id'
+          dbName: auto_racing_results_id
           reference:
             onDelete: cascade
         - name: db_most_laps_leading