diff --git a/constants.py b/constants.py index 3bd8420..8689d11 100644 --- a/constants.py +++ b/constants.py @@ -6,6 +6,7 @@ db_frames_fields = ("id", "comment", "course", "created", +"created_unix", "format", "frame", "from", diff --git a/kiss_and_db.py b/kiss_and_db.py index 5e23ef9..bfb5d9b 100644 --- a/kiss_and_db.py +++ b/kiss_and_db.py @@ -5,6 +5,7 @@ import aprs import json import aprslib import configparser +import time def read_config(): config = configparser.ConfigParser() @@ -46,6 +47,7 @@ def main(): a['station_call'] = config['Settings']['station_call'] a['station_lat'] = config['Settings']['station_lat'] a['station_lon'] = config['Settings']['station_lon'] + a['created_unix'] = int(time.time()) print(a) # Make this a string and deal with it later (probably a mistake) a['path'] = str(a['path']) diff --git a/schema.sql b/schema.sql index b329b89..4a64402 100644 --- a/schema.sql +++ b/schema.sql @@ -8,6 +8,7 @@ CREATE TABLE frames ( comment TEXT, course REAL, created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + created_unix INT, format TEXT, frame TEXT, "from" TEXT,