From 2fff669cc3625078fa9531a02dcbffbe7c4c53ec Mon Sep 17 00:00:00 2001 From: Jason Staack Date: Sat, 21 Mar 2026 23:27:52 -0500 Subject: [PATCH] fix(migration): use CAST instead of :: for jsonb type cast in seed data SQLAlchemy's text() interprets ::jsonb as a named parameter binding. Use CAST(:profile_data AS jsonb) to avoid the collision. Co-Authored-By: Claude Opus 4.6 (1M context) --- backend/alembic/versions/038_snmp_profiles_table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/alembic/versions/038_snmp_profiles_table.py b/backend/alembic/versions/038_snmp_profiles_table.py index 432c5a3..c7de9be 100644 --- a/backend/alembic/versions/038_snmp_profiles_table.py +++ b/backend/alembic/versions/038_snmp_profiles_table.py @@ -662,7 +662,7 @@ def upgrade() -> None: category, profile_data, is_system) VALUES (NULL, :name, :description, :sys_object_id, :vendor, - :category, :profile_data::jsonb, TRUE) + :category, CAST(:profile_data AS jsonb), TRUE) """), { "name": profile["name"],