link playlists to a userid

+ fix favorites foreign key
+ add migration to add userid foreign key to playlists table
This commit is contained in:
cwilvx
2024-06-09 11:08:18 +03:00
parent 8fa64b3a4d
commit fcf1469428
6 changed files with 102 additions and 41 deletions
+3 -3
View File
@@ -139,8 +139,8 @@ class SQLiteAuthMethods:
"""
Delete a user by username.
"""
sql = "DELETE FROM users WHERE username = ?"
sql = "DELETE FROM users WHERE id = ?"
print("deleting user: ", username)
with SQLiteManager(userdata_db=True) as cur:
cur.execute(sql, (username,))
cur.execute(sql, (3,))
cur.close()