added image_url column to dicom table

This commit is contained in:
2026-03-10 23:39:44 -03:00
parent 92e3a3f0f9
commit 78d48db9ea
2 changed files with 5 additions and 1 deletions

1
app.py
View File

@@ -71,6 +71,7 @@ def init_db():
name TEXT UNIQUE,
amount REAL DEFAULT 0,
notes TEXT,
image_url TEXT,
last_updated TEXT DEFAULT CURRENT_TIMESTAMP)''')
# Default user logic remains same...

View File

@@ -12,7 +12,10 @@ def upgrade_db():
# App.py also expects unit_type, adding it to prevent future headaches
conn.execute("ALTER TABLE products ADD COLUMN unit_type TEXT DEFAULT 'unit'")
print("Successfully added 'unit_type' column.")
conn.execute("ALTER TABLE dicom ADD COLUMN image_url TEXT;")
print("Successfully added 'image_url' column.")
conn.commit()
print("Migration complete. Your data is intact.")