[34588f42] Keine Zusammenfassung angegeben.
Keine Zusammenfassung angegeben.
This commit is contained in:
18
fotograf-de-scraper/backend/migrate_db.py
Normal file
18
fotograf-de-scraper/backend/migrate_db.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import sqlite3
|
||||
import os
|
||||
|
||||
db_path = "/app/data/fotograf_jobs.db"
|
||||
if not os.path.exists(db_path):
|
||||
db_path = "fotograf-de-scraper/backend/data/fotograf_jobs.db"
|
||||
|
||||
conn = sqlite3.connect(db_path)
|
||||
cursor = conn.cursor()
|
||||
|
||||
try:
|
||||
cursor.execute("ALTER TABLE job_participants ADD COLUMN digital_package_ordered INTEGER DEFAULT 0;")
|
||||
print("Column 'digital_package_ordered' added successfully.")
|
||||
except sqlite3.OperationalError:
|
||||
print("Column 'digital_package_ordered' already exists.")
|
||||
|
||||
conn.commit()
|
||||
conn.close()
|
||||
Reference in New Issue
Block a user