From: Michael Orlitzky Date: Sun, 15 Jun 2014 02:52:25 +0000 (-0400) Subject: Fix a bug in the AutoRacingResults template Haskell. X-Git-Tag: 0.0.6~203 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=e46c9e59d0594c28dcb2d3c18fb877298bc1b5dd;p=dead%2Fhtsn-import.git Fix a bug in the AutoRacingResults template Haskell. Add the database schema diagram for AutoRacingResults. Add AutoRacingResultsXML.dtd as a supported type in the documentation. --- diff --git a/doc/TODO b/doc/TODO index 5d2bb25..44ab2dc 100644 --- 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 index 0000000..5365fe2 Binary files /dev/null and b/doc/dbschema/AutoRacingResultsXML.png differ diff --git a/doc/man1/htsn-import.1 b/doc/man1/htsn-import.1 index 91bd43c..450ad7a 100644 --- a/doc/man1/htsn-import.1 +++ b/doc/man1/htsn-import.1 @@ -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 diff --git a/htsn-import.cabal b/htsn-import.cabal index d381b15..f264e30 100644 --- a/htsn-import.cabal +++ b/htsn-import.cabal @@ -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 diff --git a/src/TSN/XML/AutoRacingResults.hs b/src/TSN/XML/AutoRacingResults.hs index 96433ee..bfc07d1 100644 --- a/src/TSN/XML/AutoRacingResults.hs +++ b/src/TSN/XML/AutoRacingResults.hs @@ -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