Skip to content

Commit 7477ede

Browse files
author
Madison May
committed
Log UID
1 parent 5645ab8 commit 7477ede

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

db.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ def setup():
99
create_table(datatype)
1010

1111
def create_table(datatype):
12-
cmd = "CREATE TABLE IF NOT EXISTS %s (Timestamp double precision, Measurement double precision)" % datatype
12+
cmd = "CREATE TABLE IF NOT EXISTS %s (UID int, Timestamp double precision, Measurement double precision)" % datatype
1313
return pool.runQuery(cmd)
1414

1515
def add(d):
1616
datatype = config.datatype_mapping[d['DataType']]
17-
cmd = "INSERT INTO %s VALUES (%f, %f)" % (datatype, d['Timestamp'], d['Measurement'])
17+
cmd = "INSERT INTO %s VALUES (%i, %f, %f)" % (datatype, d['UID'], d['Timestamp'], d['Measurement'])
1818
return pool.runQuery(cmd)
1919

2020
def all(datatype):

0 commit comments

Comments
 (0)