-- 35절. 통화는 KRW 또는 USD. -- 001_init.sql 부터 007_currency.sql 까지는 고치지 않는다. -- 트리거와 함수는 만들지 않는다. alter table prices drop constraint prices_currency_check; alter table prices add constraint prices_currency_check check (currency in ('KRW', 'USD')); alter table services drop constraint services_currency_check; alter table services add constraint services_currency_check check (currency in ('KRW', 'USD')); alter table orders drop constraint orders_currency_check; alter table orders add constraint orders_currency_check check (currency in ('KRW', 'USD')); alter table order_items drop constraint order_items_currency_check; alter table order_items add constraint order_items_currency_check check (currency in ('KRW', 'USD')); alter table order_items drop constraint order_items_cost_currency_check; alter table order_items add constraint order_items_cost_currency_check check (cost_currency in ('KRW', 'USD')); alter table payments drop constraint payments_currency_check; alter table payments add constraint payments_currency_check check (currency in ('KRW', 'USD')); alter table order_items add constraint order_items_same_currency_check check (cost_currency = currency);