Add created_unix field to frames table.
This commit is contained in:
parent
e19a8c777c
commit
494f53bd62
|
@ -6,6 +6,7 @@ db_frames_fields = ("id",
|
||||||
"comment",
|
"comment",
|
||||||
"course",
|
"course",
|
||||||
"created",
|
"created",
|
||||||
|
"created_unix",
|
||||||
"format",
|
"format",
|
||||||
"frame",
|
"frame",
|
||||||
"from",
|
"from",
|
||||||
|
|
|
@ -5,6 +5,7 @@ import aprs
|
||||||
import json
|
import json
|
||||||
import aprslib
|
import aprslib
|
||||||
import configparser
|
import configparser
|
||||||
|
import time
|
||||||
|
|
||||||
def read_config():
|
def read_config():
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
|
@ -46,6 +47,7 @@ def main():
|
||||||
a['station_call'] = config['Settings']['station_call']
|
a['station_call'] = config['Settings']['station_call']
|
||||||
a['station_lat'] = config['Settings']['station_lat']
|
a['station_lat'] = config['Settings']['station_lat']
|
||||||
a['station_lon'] = config['Settings']['station_lon']
|
a['station_lon'] = config['Settings']['station_lon']
|
||||||
|
a['created_unix'] = int(time.time())
|
||||||
print(a)
|
print(a)
|
||||||
# Make this a string and deal with it later (probably a mistake)
|
# Make this a string and deal with it later (probably a mistake)
|
||||||
a['path'] = str(a['path'])
|
a['path'] = str(a['path'])
|
||||||
|
|
|
@ -8,6 +8,7 @@ CREATE TABLE frames (
|
||||||
comment TEXT,
|
comment TEXT,
|
||||||
course REAL,
|
course REAL,
|
||||||
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
created_unix INT,
|
||||||
format TEXT,
|
format TEXT,
|
||||||
frame TEXT,
|
frame TEXT,
|
||||||
"from" TEXT,
|
"from" TEXT,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user