CREATE OR REPLACE FUNCTION pg_temp.jsonb_to_text_array(js jsonb)
RETURNS text[] LANGUAGE sql IMMUTABLE PARALLEL SAFE AS
'SELECT ARRAY(SELECT jsonb_array_elements_text(js))';

ALTER TABLE landing_data
DROP CONSTRAINT extras_jsonb_object,
ALTER extras DROP default,
ALTER extras TYPE text[] USING pg_temp.jsonb_to_text_array(extras->'plain_extras'),
ALTER extras SET DEFAULT '{}';
