--ABS-159186

--CUSTOMERRESIDENTIALSETTINGS TABLE
ALTER TABLE CUSTOMERRESIDENTIALSETTINGS ADD (LINENPERCLIENTROOM NUMBER DEFAULT 0 NOT NULL CONSTRAINT CHK_CUSTOMERRESIDENTIALSETTINGS_LINENPERCLIENTROOM CHECK (LINENPERCLIENTROOM IN (0, 1)),
                                             CLIENTSPERROOM     NUMBER DEFAULT 0 NOT NULL CONSTRAINT CHK_CUSTOMERRESIDENTIALSETTINGS_CLIENTSPERROOM CHECK (CLIENTSPERROOM IN (0, 1)));

COMMENT ON COLUMN CUSTOMERRESIDENTIALSETTINGS.LINENPERCLIENTROOM IS '0 = No linen per client room / Not applicable. 1 = Linen per Client Room. Option 1 is only used in combination with the module LINENPERCLIENTROOM';
COMMENT ON COLUMN CUSTOMERRESIDENTIALSETTINGS.CLIENTSPERROOM IS '0 = No limitation / allow multiple clients per room. 1 = Maximum 1 client per room.';                                       

ALTER TABLE CLIENT DROP CONSTRAINT CLIENTTYPE_VALID1_1;

ALTER TABLE CLIENT ADD CONSTRAINT CHK_CLIENT_CLIENTTYPE CHECK (CLIENTTYPE IN (0, 1, 2, 3, 4));

COMMENT ON COLUMN CLIENT.CLIENTTYPE IS '0 = Normal Client 1 = Unknown Client (client for garments for which it is unknown to who they belong) 2 = Pool Client per Department 3 = Pool Client per Customer 4 = Dummy Client to define linen per room';
