make image hash the primary key of the images table

This commit is contained in:
csd4ni3l
2025-08-09 14:22:41 +02:00
parent c34e73d583
commit 3309fb840e

View File

@@ -30,9 +30,9 @@ def get_db():
""") """)
db.execute(""" db.execute("""
CREATE TABLE IF NOT EXISTS Images ( CREATE TABLE IF NOT EXISTS Images (
username TEXT PRIMARY KEY, image_hash TEXT PRIMARY KEY
username TEXT NOT NULL,
filename TEXT NOT NULL, filename TEXT NOT NULL,
image_hash TEXT NOT NULL
) )
""") """)
db.commit() db.commit()