aboutsummaryrefslogtreecommitdiff
path: root/app/db.py
diff options
context:
space:
mode:
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 c2ceb8b..1750472 100644
--- a/app/db.py
+++ b/app/db.py
@@ -12,7 +12,7 @@ def init_db():
with engine.begin() as conn:
conn.execute(sqlalchemy.text(
'''
- CREATE TABLE IF NOT EXISTS accounts (
+ CREATE TABLE IF NOT EXISTS keys (
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(api_key), PRIMARY KEY (link)
+ FOREIGN KEY (owner) REFERENCES keys(api_key), PRIMARY KEY (link)
)
'''
))