Fix SQL for merge-induced breakage.

This commit is contained in:
Nick Foster 2012-10-10 08:21:17 -07:00
parent 24cd839f56
commit 0f38bfd0d7

View File

@ -43,7 +43,7 @@ class output_sql(air_modes.parse):
"lat" REAL, "lat" REAL,
"lon" REAL "lon" REAL
);""" );"""
self.execute(c, query) c.execute(query)
query = """CREATE TABLE IF NOT EXISTS "vectors" ( query = """CREATE TABLE IF NOT EXISTS "vectors" (
"icao" INTEGER KEY NOT NULL, "icao" INTEGER KEY NOT NULL,
"seen" TEXT NOT NULL, "seen" TEXT NOT NULL,
@ -51,12 +51,12 @@ class output_sql(air_modes.parse):
"heading" REAL, "heading" REAL,
"vertical" REAL "vertical" REAL
);""" );"""
self.execute(c, query) c.execute(query)
query = """CREATE TABLE IF NOT EXISTS "ident" ( query = """CREATE TABLE IF NOT EXISTS "ident" (
"icao" INTEGER PRIMARY KEY NOT NULL, "icao" INTEGER PRIMARY KEY NOT NULL,
"ident" TEXT NOT NULL "ident" TEXT NOT NULL
);""" );"""
self.execute(c, query) c.execute(query)
c.close() c.close()
self.db.commit() self.db.commit()
#we close the db conn now to reopen it in the output() thread context. #we close the db conn now to reopen it in the output() thread context.