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,
|
name TEXT UNIQUE,
|
||||||
amount REAL DEFAULT 0,
|
amount REAL DEFAULT 0,
|
||||||
notes TEXT,
|
notes TEXT,
|
||||||
|
image_url TEXT,
|
||||||
last_updated TEXT DEFAULT CURRENT_TIMESTAMP)''')
|
last_updated TEXT DEFAULT CURRENT_TIMESTAMP)''')
|
||||||
|
|
||||||
# Default user logic remains same...
|
# Default user logic remains same...
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ def upgrade_db():
|
|||||||
conn.execute("ALTER TABLE products ADD COLUMN unit_type TEXT DEFAULT 'unit'")
|
conn.execute("ALTER TABLE products ADD COLUMN unit_type TEXT DEFAULT 'unit'")
|
||||||
print("Successfully added 'unit_type' column.")
|
print("Successfully added 'unit_type' column.")
|
||||||
|
|
||||||
|
conn.execute("ALTER TABLE dicom ADD COLUMN image_url TEXT;")
|
||||||
|
print("Successfully added 'image_url' column.")
|
||||||
|
|
||||||
conn.commit()
|
conn.commit()
|
||||||
print("Migration complete. Your data is intact.")
|
print("Migration complete. Your data is intact.")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user