-- Revert camper:campsite_type_option_cost__-cost_per_night from pg

begin;

set search_path to camper, public;

alter table campsite_type_option_cost
  add column if not exists cost_per_night integer not null default 1 constraint cost_per_night_not_negative check(cost_per_night >= 0)
;

alter table campsite_type_option_cost
  alter column cost_per_night drop default
;

update campsite_type_option_cost
set cost_per_night = cost
;


commit;
