The Database Upgrade
The goal here is to have an entirely new database spec. Everything is going to be in one file. Note that this will require multiple account support.
Accounts
account_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, name TEXT, object Account
Markets
market_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, account_id INTEGER, frequency NUMBER, last_checked datet…
The goal here is to have an entirely new database spec. Everything is going to be in one file. Note that this will require multiple account support.
Accounts
account_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, name TEXT, object Account
Markets
market_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, account_id INTEGER, frequency NUMBER, last_checked datetime, object Market
Scanners
scanner_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, account_id INTEGER, frequency NUMBER, last_checked datetime, object Scanner
Pending
task_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, account_id INTEGER, cost INTEGER, priority INTEGER, request JSON
Each of these needs to come with functions to avoid direct use of database