From 4da00750a8f7672568e6fb0e90b63cc96b54e36d Mon Sep 17 00:00:00 2001 From: Carlos Escalante Date: Fri, 3 Apr 2026 20:14:20 -0600 Subject: [PATCH] Fix migration to use IF NOT EXISTS and Postgres-compatible DEFAULT Co-Authored-By: Claude Opus 4.6 (1M context) --- backend/app/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/db.py b/backend/app/db.py index 7d0c02b..2eb4ae8 100644 --- a/backend/app/db.py +++ b/backend/app/db.py @@ -16,7 +16,7 @@ def run_migrations(): try: conn.execute( text( - "ALTER TABLE transaction ADD COLUMN deferred_to_next_cycle BOOLEAN NOT NULL DEFAULT 0" + "ALTER TABLE transaction ADD COLUMN IF NOT EXISTS deferred_to_next_cycle BOOLEAN NOT NULL DEFAULT false" ) ) conn.commit()