--ABS-86554 / ABS-91571

-------------- EMAILSETTING ------------
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 soil 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';

ALTER TABLE EMAILSETTING DROP CONSTRAINT DOCUMENTTYPE_VALID3;
ALTER TABLE EMAILSETTING ADD CONSTRAINT CHK_EMAILSETTING_DOCUMENTTYPE CHECK (DOCUMENTTYPE BETWEEN 1 AND 36);