-- Add/modify columns 
alter table I_UNIQUEPOOL modify STATUS default 20;
-- Create/Recreate check constraints 
alter table I_UNIQUEPOOL
  drop constraint I_UNIQUEPOOL_STATUS_CHECK;
alter table I_UNIQUEPOOL
  add constraint I_UNIQUEPOOL_STATUS_CHECK
  check (STATUS = 20);
alter table I_UNIQUEPOOL
  add constraint I_UNIQUEPOOL_STAY_CUST_CHECK
  check (STAY <> 20 or (STAY = 20 and CUSTOMERNUMBER is not null and DEPARTMENTNUMBER is not null));  
alter table I_UNIQUEPOOL
  add constraint I_UNIQUEPOOL_RELATEDCUSTOMER
  check (RELATEDCUSTOMERNUMBER is not null or (RELATEDCUSTOMERNUMBER is null  and CUSTOMERNUMBER is not null and DEPARTMENTNUMBER is not null));
