Add created_unix field to frames table.

This commit is contained in:
W1CDN 2023-05-13 20:59:38 -05:00
parent e19a8c777c
commit 494f53bd62
3 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,7 @@ db_frames_fields = ("id",
"comment",
"course",
"created",
"created_unix",
"format",
"frame",
"from",

View File

@ -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'])

View File

@ -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,