   VALUES (NEXT VALUE FOR LOGGER_ID_SEQ, 'ROOT', NULL, 3);
 
 -- Root logger in effective, it cannot be deleted after.
-INSERT INTO CONF_LOGGERS_EFFECTIVE (LOGGER_ID, NAME, PARENT_ID,
-  LEVEL_ID, HIERARCHY)
-  VALUES (PREVIOUS VALUE FOR LOGGER_ID_SEQ, 'ROOT', NULL, 3,
+INSERT INTO CONF_LOGGERS_EFFECTIVE (LOGGER_ID, LEVEL_ID, HIERARCHY)
+  VALUES (PREVIOUS VALUE FOR LOGGER_ID_SEQ, 3,
   CHAR(PREVIOUS VALUE FOR LOGGER_ID_SEQ));
 
 -- Basic appenders.

  ADD COLUMN HIERARCHY VARCHAR(32) NOT NULL
  DEFAULT '';

ALTER TABLE CONF_LOGGERS_EFFECTIVE ALTER COLUMN LEVEL_ID SET NOT NULL;

CALL SYSPROC.ADMIN_CMD ('REORG TABLE CONF_LOGGERS_EFFECTIVE');


ALTER TABLE CONF_LOGGERS_EFFECTIVE ADD CONSTRAINT LOG_LOGGERS_EFF_FK_LEVELS FOREIGN KEY (LEVEL_ID) REFERENCES LEVELS (LEVEL_ID) ON DELETE CASCADE;

ALTER TABLE CONF_LOGGERS_EFFECTIVE ADD CONSTRAINT LOG_LOGGERS_EFF_FK_CNF_LOG FOREIGN KEY (LOGGER_ID) REFERENCES CONF_LOGGERS (LOGGER_ID) ON DELETE CASCADE;

COMMENT ON TABLE CONF_LOGGERS_EFFECTIVE IS 'Configuration table for the effective logger levels';

COMMENT ON CONF_LOGGERS_EFFECTIVE (
  LOGGER_ID IS 'Logger identifier',
  LEVEL_ID IS 'Log level to register',
  HIERARCHY IS 'Comma separated numbers that represents the hierarchy'
  );
