feat: aggiunti: loggica random, tema scuro, correzioni mail, miglioramenti generali, cache;

This commit is contained in:
StefanoSalemi
2026-04-17 18:27:37 +02:00
parent a7ef46640d
commit 104ad53a9a
26 changed files with 861 additions and 216 deletions

25
migrate_db.py Normal file
View File

@@ -0,0 +1,25 @@
import sqlite3
def migrate():
db_path = "data/parking.db"
try:
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
# Add the new column
cursor.execute("ALTER TABLE offices ADD COLUMN assignment_mode VARCHAR DEFAULT 'fairness'")
print("Success: Added assignment_mode to offices table.")
conn.commit()
except sqlite3.OperationalError as e:
if "duplicate column name" in str(e):
print("Info: Column assignment_mode already exists.")
else:
print(f"Error: {e}")
finally:
if conn:
conn.close()
if __name__ == "__main__":
migrate()