-- Revert camper:contact_email from pg

begin;

set search_path to camper, public;

alter table contact
  add column email email
;

update contact
set email = email.email
from contact_email as email
where email.contact_id = email.contact_id
;

alter table contact
  alter column email set not null
;

drop table if exists contact_email;

commit;
