postgresql - add a constraint to a column
alter table bca_bulk_cargo drop constraint if exists bca_goods_item_number_max_value; alter table bca_bulk_cargo add column if not exists bca_goods_item_number integer constraint bca_goods_item_number_max_value check (bca_goods_item_number between 1 and 99999);