diff options
author | Botond Hende <nettingman@gmail.com> | 2024-08-31 01:06:58 +0200 |
---|---|---|
committer | Botond Hende <nettingman@gmail.com> | 2024-08-31 01:06:58 +0200 |
commit | 254a5eda7d17ff28d4604d95dba6f102120189b8 (patch) | |
tree | eb9990386d9d32b903a0912010229ee1cdc114f1 /__main__.py | |
parent | 9b686d79871c6f76b8ea36d8a8a43d3edb32def7 (diff) |
ship data initialization on startup
Diffstat (limited to '__main__.py')
-rw-r--r-- | __main__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/__main__.py b/__main__.py index 9b23484..03fb366 100644 --- a/__main__.py +++ b/__main__.py @@ -11,6 +11,8 @@ from .modules.database import cursor, conn async def lifespan(app: FastAPI): cursor.execute( "CREATE TABLE IF NOT EXISTS agents(primary_key INTEGER PRIMARY KEY, callsign TEXT NOT NULL UNIQUE, token TEXT NOT NULL)") + cursor.execute( + "CREATE TABLE IF NOT EXISTS ships(primary_key INTEGER PRIMARY KEY, symbol TEXT NOT NULL UNIQUE, task TEXT NOT NULL, params TEXT)") conn.commit() agents.load_agents_from_database() yield |