Skip to content

Commit

Permalink
πŸ› fix: kafka producer booleans migration null values (louislam#3984)
Browse files Browse the repository at this point in the history
Signed-off-by: Muhammed Hussein Karimi <[email protected]>
  • Loading branch information
mhkarimi1383 authored Nov 9, 2023
1 parent 38efd97 commit 0608881
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions db/patch-fix-kafka-producer-booleans.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ ALTER TABLE monitor
ADD COLUMN kafka_producer_allow_auto_topic_creation BOOLEAN default 0 NOT NULL;

-- Set bring old values from `_old` COLUMNs to correct ones
UPDATE monitor set kafka_producer_allow_auto_topic_creation = monitor.kafka_producer_allow_auto_topic_creation_old;
UPDATE monitor set kafka_producer_ssl = monitor.kafka_producer_ssl_old;
UPDATE monitor SET kafka_producer_allow_auto_topic_creation = monitor.kafka_producer_allow_auto_topic_creation_old
WHERE monitor.kafka_producer_allow_auto_topic_creation_old IS NOT NULL;

UPDATE monitor SET kafka_producer_ssl = monitor.kafka_producer_ssl_old
WHERE monitor.kafka_producer_ssl_old IS NOT NULL;

-- Remove old COLUMNs
ALTER TABLE monitor
Expand Down

0 comments on commit 0608881

Please sign in to comment.