-- ABS-36531/ ABS-41416

ALTER TABLE LDAPSETTINGS DROP COLUMN LDAPTYPE;

--Added column with DEFAULT 2 to set up existing records with value 2
ALTER TABLE LDAPSETTINGS ADD (LDAPTYPE NUMBER DEFAULT 2 NOT NULL
                              CONSTRAINT LDAPTYPE_VALID1_1 CHECK (LDAPTYPE IN (1, 2)));

COMMENT ON COLUMN LDAPSETTINGS.LDAPTYPE
  IS '1 = Active directory (default value) 
2 = OpenLDAP';

--For new records the DEFAULT should be set up to 1
ALTER TABLE LDAPSETTINGS MODIFY (LDAPTYPE DEFAULT 1);