From cd03da32603885539e53246daed76a7e7c0ac9f8 Mon Sep 17 00:00:00 2001 From: Robin Edwards Date: Mon, 15 Jan 2024 16:23:35 +0000 Subject: [PATCH] Cast to JSONB type to match altered column type (#6707) --- .../7205816877ec_change_type_of_json_fields_from_varchar_.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/versions/7205816877ec_change_type_of_json_fields_from_varchar_.py b/migrations/versions/7205816877ec_change_type_of_json_fields_from_varchar_.py index 7364893da6..1b4dd55dfe 100644 --- a/migrations/versions/7205816877ec_change_type_of_json_fields_from_varchar_.py +++ b/migrations/versions/7205816877ec_change_type_of_json_fields_from_varchar_.py @@ -63,7 +63,7 @@ def upgrade(): existing_type=sa.Text(), type_=JSONB(astext_type=sa.Text()), nullable=True, - postgresql_using='data::text', + postgresql_using='data::jsonb', server_default=sa.text("'{}'::jsonb")) op.alter_column('changes', 'change', existing_type=JSON(astext_type=sa.Text()),