ALTER TABLE medreport.connected_online_providers ADD COLUMN key text not null DEFAULT ''; -- avoid conflict with already existing data, will be filled on next sync ALTER TABLE medreport.connected_online_providers ALTER key DROP DEFAULT; ALTER TABLE medreport.connected_online_providers ADD COLUMN address text not null DEFAULT ''; ALTER TABLE medreport.connected_online_providers ALTER key DROP DEFAULT; ALTER TABLE medreport.connected_online_services ALTER COLUMN sync_id TYPE bigint USING sync_id::bigint;