24 lines
348 B
PL/PgSQL
24 lines
348 B
PL/PgSQL
-- Revert numerus:contact_email from pg
|
|
|
|
begin;
|
|
|
|
set search_path to numerus, 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;
|