ALTER TABLE country_services ADD COLUMN preview character varying;


UPDATE country_services cs SET preview = (SELECT substring(publish_resources[1] FROM 0 for position('publishResource.php' in publish_resources[1])) FROM country_services cs2 WHERE cs2.id = cs.id);