`jsonb` comparison wasn't working as expected, and duplicated entries were inserted within `flow_node`. To resolve this add a second hash column, `hash_v2` with a unique default for uniqueness, and use this new column to ensure unique entries. The previous hash column is left for backward compatibility. Duplicated entries already insterted will remain as is without breaking, and only new ones will preserve uniqueness.
3 lines
77 B
SQL
3 lines
77 B
SQL
-- Add down migration script here
|
|
ALTER TABLE flow_node DROP COLUMN hash_v2;
|