Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: use ->> (#18471)

h3n4lb695c69883ad
diff --git a/backend/migrator/migration/3.13/0017##update_review_config_rule_type.sql b/backend/migrator/migration/3.13/0017##update_review_config_rule_type.sql
index b576018a4b..697f41a08c 100644
--- a/backend/migrator/migration/3.13/0017##update_review_config_rule_type.sql
+++ b/backend/migrator/migration/3.13/0017##update_review_config_rule_type.sql
@@ -148,6 +148,6 @@ BEGIN
FROM jsonb_array_elements(r.payload->'sqlReviewRules') AS rules(rule)
)
)
- WHERE id = r.id;
+ WHERE id = r.id and r.payload ->> 'sqlReviewRules' IS NOT NULL;
END LOOP;
END $$;
diff --git a/backend/migrator/migration/3.13/0018##migrate_review_config_payload_to_proto.sql b/backend/migrator/migration/3.13/0018##migrate_review_config_payload_to_proto.sql
index a7c321b636..44b1baac0b 100644
--- a/backend/migrator/migration/3.13/0018##migrate_review_config_payload_to_proto.sql
+++ b/backend/migrator/migration/3.13/0018##migrate_review_config_payload_to_proto.sql
@@ -149,6 +149,6 @@ BEGIN
FROM jsonb_array_elements(r.payload->'sqlReviewRules') AS rules(rule)
)
)
- WHERE id = r.id;
+ WHERE id = r.id AND r.payload ->> 'sqlReviewRules' IS NOT NULL;
END LOOP;
END $$;