ALTER TABLE biz_state
ADD COLUMN permalink text;

UPDATE biz_state
SET permalink = unstable_data.permalink
FROM (
    SELECT id, contacts -> 'geo' ->> 'permalink' AS permalink
    FROM landing_data
) AS unstable_data
WHERE unstable_version = unstable_data.id;

ALTER TABLE biz_state
ALTER COLUMN permalink SET NOT NULL;
