camper/revert/contact_email.sql

24 lines
346 B
MySQL
Raw Normal View History

-- 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;