]> gitweb.michael.orlitzky.com - dead/htsn-import.git/blobdiff - src/TSN/XML/AutoRacingResults.hs
Whitespace/comment formatting.
[dead/htsn-import.git] / src / TSN / XML / AutoRacingResults.hs
index a32d704f355a29c427bfcd2df4c7b057c92a9b98..503cfff7cd80867282a2d034e371aea7a711737b 100644 (file)
@@ -57,8 +57,7 @@ import Text.XML.HXT.Core (
   xpWrap )
 
 -- Local imports.
-import TSN.Codegen (
-  tsn_codegen_config )
+import TSN.Codegen ( tsn_codegen_config )
 import TSN.DbImport ( DbImport(..), ImportResult(..), run_dbmigrate )
 import TSN.Picklers ( xp_earnings, xp_datetime, xp_time_stamp )
 import TSN.XmlImport ( XmlImport(..), XmlImportFk(..) )
@@ -352,9 +351,9 @@ instance XmlImportFk AutoRacingResultsRaceInformationXml
 
 
 
----
---- Database stuff.
----
+--
+-- * Database stuff.
+--
 
 instance DbImport Message where
   dbmigrate _ =
@@ -370,8 +369,7 @@ instance DbImport Message where
 
     insert_xml_fk_ msg_id (xml_race_information m)
 
-    forM_ (xml_listings m) $ \listing -> do
-      insert_xml_fk_ msg_id listing
+    forM_ (xml_listings m) $ insert_xml_fk_ msg_id
 
     return ImportSucceeded
 
@@ -383,7 +381,7 @@ mkPersist tsn_codegen_config [groundhog|
   constructors:
     - name: AutoRacingResults
       uniques:
-        - name: unique_auto_racing_schedule
+        - name: unique_auto_racing_results
           type: constraint
           # Prevent multiple imports of the same message.
           fields: [db_xml_file_id]
@@ -398,9 +396,9 @@ 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.
+  # 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: