diff options
author | Parker <contact@pkrm.dev> | 2024-02-26 16:31:09 -0600 |
---|---|---|
committer | Parker <contact@pkrm.dev> | 2024-02-26 16:31:09 -0600 |
commit | a0bfa5440603841c40e6a29495ca49c09a5d8c83 (patch) | |
tree | 338dfb66b0bb4d26f7755b58770f130b434aaa71 /app/db.py | |
parent | ec4c5f0c34a4d2071aaf37aa768808c4b3741de7 (diff) |
working on changing from flask -> fastapi
Diffstat (limited to 'app/db.py')
-rw-r--r-- | app/db.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) ) ''' )) |