added image_url column to dicom table
This commit is contained in:
1
app.py
1
app.py
@@ -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...
|
||||
|
||||
@@ -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.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user