-- Deploy camper:campsite_type_option_cost__cost to pg -- requires: campsite_type_option_cost begin; set search_path to camper, public; alter table campsite_type_option_cost rename constraint cost_not_negative to cost_per_night_not_negative ; alter table campsite_type_option_cost add column if not exists cost integer not null default 1 constraint cost_not_negative check(cost >= 0) ; alter table campsite_type_option_cost alter column cost drop default ; commit;