Skip to content

Commit

Permalink
Add metadata tracking of when COOP/climodat sites report data
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Aug 28, 2015
1 parent 54af387 commit 25c80e3
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 1 deletion.
3 changes: 3 additions & 0 deletions database/upgrade/asos/1.sql
@@ -0,0 +1,3 @@
-- Add Tracking of Hour of 24 Hour Summaries!
ALTER TABLE stations ADD temp24_hour smallint;
ALTER TABLE stations ADD precip24_hour smallint;
3 changes: 3 additions & 0 deletions database/upgrade/coop/1.sql
@@ -0,0 +1,3 @@
-- Add Tracking of Hour of 24 Hour Summaries!
ALTER TABLE stations ADD temp24_hour smallint;
ALTER TABLE stations ADD precip24_hour smallint;
3 changes: 3 additions & 0 deletions database/upgrade/hads/1.sql
@@ -0,0 +1,3 @@
-- Add Tracking of Hour of 24 Hour Summaries!
ALTER TABLE stations ADD temp24_hour smallint;
ALTER TABLE stations ADD precip24_hour smallint;
3 changes: 3 additions & 0 deletions database/upgrade/iem/7.sql
@@ -0,0 +1,3 @@
-- Add Tracking of Hour of 24 Hour Summaries!
ALTER TABLE stations ADD temp24_hour smallint;
ALTER TABLE stations ADD precip24_hour smallint;
3 changes: 3 additions & 0 deletions database/upgrade/mesosite/5.sql
@@ -0,0 +1,3 @@
-- Add Tracking of Hour of 24 Hour Summaries!
ALTER TABLE stations ADD temp24_hour smallint;
ALTER TABLE stations ADD precip24_hour smallint;
3 changes: 3 additions & 0 deletions database/upgrade/postgis/10.sql
@@ -0,0 +1,3 @@
-- Add Tracking of Hour of 24 Hour Summaries!
ALTER TABLE stations ADD temp24_hour smallint;
ALTER TABLE stations ADD precip24_hour smallint;
3 changes: 2 additions & 1 deletion scripts/dbutil/sync_stations.py
Expand Up @@ -74,7 +74,8 @@ def sync(dbname):
sigstage_moderate = %(sigstage_moderate)s,
sigstage_major = %(sigstage_major)s,
sigstage_record = %(sigstage_record)s, ugc_county = %(ugc_county)s,
ugc_zone = %(ugc_zone)s, id = %(id)s, ncdc81 = %(ncdc81)s
ugc_zone = %(ugc_zone)s, id = %(id)s, ncdc81 = %(ncdc81)s,
temp24_hour = %(temp24_hour)s, precip24_hour = %(precip24_hour)s
WHERE iemid = %(iemid)s""", row)
print ("DB: %-7s Del %3s Mod %4s rows TS: %s IEMID: %s"
"") % (dbname, len(todelete), cur.rowcount,
Expand Down

0 comments on commit 25c80e3

Please sign in to comment.