-- ABS-81878/ ABS-103588

ALTER TABLE AUTOMATICFLAG
  DROP CONSTRAINT FLAGTYPE_VALID1_1;
ALTER TABLE AUTOMATICFLAG
  ADD CONSTRAINT CHK_AUTOFLAG_FLAGTYPE
  CHECK (FLAGTYPE IN (1, 2, 3, 4, 5));

COMMENT ON COLUMN AUTOMATICFLAG.FLAGTYPE
  IS '1=Garment/wearer flags
2=OR-pack flags
3=Container flags
4=Residential/domestic
5=Unique Item Service
The flagtype corresponds with the FlagType from the Flag table. 2 and 3 are not (yet) used for automatic flags.';