ALTER TABLE CONTENT
	ADD COLUMN KEY_MODULE_ROOT_DOMAIN_OBJECT INTEGER;

ALTER TABLE ROOT_DOMAIN_OBJECT
	ADD COLUMN KEY_ROOT_MODULE INTEGER;

INSERT INTO CONTENT (OJB_CONCRETE_CLASS, KEY_ROOT_DOMAIN_OBJECT, KEY_MODULE_ROOT_DOMAIN_OBJECT, NAME, CREATION_DATE, PREFIX)
VALUES ('net.sourceforge.fenixedu.domain.functionalities.Module', 1, 1, 'pt4:Raizen4:Root', NOW(), '/');

UPDATE ROOT_DOMAIN_OBJECT AS RDO, CONTENT AS C
SET RDO.KEY_ROOT_MODULE = C.ID_INTERNAL
WHERE RDO.ID_INTERNAL = C.KEY_MODULE_ROOT_DOMAIN_OBJECT;
