--ABSN-6833

--CUSTOMEREXTRAINFO TABLE
ALTER TABLE CUSTOMEREXTRAINFO ADD (DRIVERCHANGEMESSAGE NUMBER DEFAULT 0 NOT NULL CONSTRAINT CHK_CUSTOMEREXTRAINFO_DRIVERCHANGEMESSAGE CHECK (DRIVERCHANGEMESSAGE IN (0,1)));

COMMENT ON COLUMN CUSTOMEREXTRAINFO.DRIVERCHANGEMESSAGE IS '0 = No driver change message 1 = Allow to send driver change message';

--EMPLOYEE TABLE
ALTER TABLE EMPLOYEE ADD(
IMAGE                 BLOB,
ALLOWSHAREIMAGE       VARCHAR2(1) DEFAULT 'N' NOT NULL CONSTRAINT CHK_EMPLOYEE_ALLOWSHAREIMAGE CHECK (ALLOWSHAREIMAGE IN ('Y','N')),
ALLOWSHARECONTACTINFO VARCHAR2(1) DEFAULT 'N' NOT NULL CONSTRAINT CHK_EMPLOYEE_ALLOWSHARECONTACTINFO CHECK (ALLOWSHARECONTACTINFO IN ('Y','N')));

--EMAILSETTING TABLE
ALTER TABLE EMAILSETTING DROP CONSTRAINT CHK_EMAILSETTING_DOCUMENTTYPE;
ALTER TABLE EMAILSETTING ADD CONSTRAINT CHK_EMAILSETTING_DOCUMENTTYPE CHECK (DOCUMENTTYPE BETWEEN 1 AND 44);

COMMENT ON COLUMN EMAILSETTING.DOCUMENTTYPE IS '1 = Invoice 2 = Statement 3 = Purchase order 4 = E-service password reminder 5 = Work order via web 6 = Invoice job checklist 7 = Customer 8 = Log Message 9 = Delivery Note / Consignment Note 10 = Stock Count / Order 11 = Wash List 12 = POD (Proof of delivery) 13 = On site scan list 14 = Shipment List 15 = Commission Report 16 = Wearer Web Login Credentials 17 = Recalculation Norm Stock Levels 18 = Recalculation Standard Deliveries 19 = Incidental Inventory 20 = Container Usage Report 21 = (Successfully) Processed OR Packs 22 = Unattended UHF Reader Status Changed 23 = Future planned deliveries 24 = Client Invoice 25 = Overuse notification 26 = Stock reservation quantity check 27 = MyUniformAssistant new PIN 28 = MyUniformAssistant Password change 29 = MyUniformAssistant test email 30 = MyUniformAssistant Password reset warning 31 = MyUniformAssistant Welcome email 32 = MyUniformAssistant username change 33 = Import payment notification 34 = Customer purchase order exception 35 = Diagnostics 36 = Credit card payment confirmation 37 = Contact notification (web) 38 = Contact notification (internal) 40 = Reject Bag Received 41 = Reject Bag Processed 42 = Delinquency Letter 43 = One time Driver change Message 44 = Permanent Driver change Message';

--EMAILSETTINGAPP TABLE
ALTER TABLE EMAILSETTINGAPP DROP CONSTRAINT CHK_EMAILSETTINGAPP_DOCUMENTTYPE;
ALTER TABLE EMAILSETTINGAPP ADD CONSTRAINT CHK_EMAILSETTINGAPP_DOCUMENTTYPE CHECK (DOCUMENTTYPE BETWEEN 1 AND 44);
