Pavanupadhyay27 commited on
Commit
cdfdfd5
·
1 Parent(s): 411cf16

Fix postgres boolean migration compatibility

Browse files
Files changed (1) hide show
  1. backend/app/core/init_db.py +1 -1
backend/app/core/init_db.py CHANGED
@@ -26,7 +26,7 @@ def init_db(db: Session):
26
  except Exception:
27
  db.rollback()
28
  logger.info("Adding emergency_allowed column to attendance table...")
29
- db.execute(text("ALTER TABLE attendance ADD COLUMN emergency_allowed BOOLEAN DEFAULT 0"))
30
  db.commit()
31
 
32
  # Ensure image_path column exists in attendance_logs table
 
26
  except Exception:
27
  db.rollback()
28
  logger.info("Adding emergency_allowed column to attendance table...")
29
+ db.execute(text("ALTER TABLE attendance ADD COLUMN emergency_allowed BOOLEAN DEFAULT FALSE"))
30
  db.commit()
31
 
32
  # Ensure image_path column exists in attendance_logs table