camper/deploy/payment__acsi_card.sql

23 lines
388 B
MySQL
Raw Normal View History

-- Deploy camper:payment__acsi_card to pg
-- requires: payment
begin;
set search_path to camper, public;
alter table payment
add column acsi_card boolean not null default false
;
update payment
set acsi_card = payment_customer.acsi_card
from payment_customer
where payment_customer.payment_id = payment.payment_id
;
alter table payment
alter column acsi_card drop default
;
commit;