From cf1260aa7e4cd1b28a7a034abb44d9aa729ac83d Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 5 Jul 2012 14:45:22 -0700 Subject: [PATCH] creates one more table to more intelligently interact with geocoding APIs --- dbstart.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dbstart.py b/dbstart.py index bcc8152..12d4642 100755 --- a/dbstart.py +++ b/dbstart.py @@ -50,4 +50,14 @@ print "\n Error: You probably already have a locations table in \"" + database + "\" database...\n" print sys.exc_info()[1] - +try: + c.execute(''' +CREATE TABLE responses +(r_id INTEGER PRIMARY KEY ASC +,loc_id INTEGER +,response TEXT +,service TEXT +,FOREIGN KEY(loc_id) REFERENCES locations(loc_id))''') +except sqlite3.OperationalError: + print "\n Error: You probably already have a responses \"" + database + "\" database...\n" + print sys.exc.info()[1]