aboutsummaryrefslogtreecommitdiff
path: root/app/db.py
diff options
context:
space:
mode:
authorParker <contact@pkrm.dev>2024-02-26 16:31:09 -0600
committerParker <contact@pkrm.dev>2024-02-26 16:31:09 -0600
commita0bfa5440603841c40e6a29495ca49c09a5d8c83 (patch)
tree338dfb66b0bb4d26f7755b58770f130b434aaa71 /app/db.py
parentec4c5f0c34a4d2071aaf37aa768808c4b3741de7 (diff)
working on changing from flask -> fastapi
Diffstat (limited to 'app/db.py')
-rw-r--r--app/db.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/db.py b/app/db.py
index 454baae..c2ceb8b 100644
--- a/app/db.py
+++ b/app/db.py
@@ -13,7 +13,7 @@ def init_db():
conn.execute(sqlalchemy.text(
'''
CREATE TABLE IF NOT EXISTS accounts (
- account_name, PRIMARY KEY (account_name)
+ api_key, PRIMARY KEY (api_key)
)
'''
))
@@ -21,7 +21,7 @@ def init_db():
'''
CREATE TABLE IF NOT EXISTS links (
owner, link, redirect_link, expire_date,
- FOREIGN KEY (owner) REFERENCES accounts(account_name), PRIMARY KEY (link)
+ FOREIGN KEY (owner) REFERENCES accounts(api_key), PRIMARY KEY (link)
)
'''
))