An a/w race in historic_races has race_type = "All Weather Flat", race_type_id = 15 (turf flat is 12) and no track_type field.
An a/w race in daily_races has race_type = "Flat" (the documentation mentions a value "AW Flat" that seems not to be used), there is no race_type_id, and you can only tell it's a/w from track_type = "Polytrack" - a field that in the documentation says has values "Left Handed", "Right Handed", "Straight" i.e. is documented as being for a completely different purpose.
Gaps between docuemntation and reality are one thing and understandable - been there - done that ! But is the inconsistency between the handling of all weather races in daily_races and historic_races as intended, or is it now likely to change, having been pointed out ?
My reason for asking is I'm writing code to use these fields, and am not sure whenther to pull in data scraped from Sporting Life to supplement daily_races or rely on SmartForm entirely since the a/w flagging seems a bit iffy. You might think this doesn't matter most of the time. However today we have Lingfield running three turf and four a/w races.
While I'm at it, I note that the occasional historic race is incorrectly flagged as all weather. For example one Brighton race has this problem. At least one at Nottingham also. There may be others too. I guess I could correct this data in my copy of the database, but would be great if you would do similarly in your master copy.