DROP TABLE IF EXISTS `CMS_FUNCTIONALITY_LINK`;
CREATE TABLE `CMS_FUNCTIONALITY_LINK` (
	`ID_INTERNAL` int NOT NULL auto_increment,
    `CREATION_DATE` timestamp NOT NULL,
    `KEY_CREATOR` int NOT NULL,
    `NAME` text,
    `DESCRIPTION` text,
    `TARGET` text,
    `KEY_CMS` int NOT NULL,
	`WRITERS_GROUP` BLOB,
	`READERS_GROUP` BLOB,	
	PRIMARY KEY (`ID_INTERNAL`)
)ENGINE=InnoDB;

DROP TABLE IF EXISTS `CMS_FUNCTIONALITY_LINK_AVAILABILITY`;
CREATE TABLE `CMS_FUNCTIONALITY_LINK_AVAILABILITY` (
  `ID_INTERNAL` INTEGER NOT NULL AUTO_INCREMENT,
  `KEY_TYPE` INTEGER NOT NULL,
  `KEY_LINK` INTEGER NOT NULL,
  PRIMARY KEY(`ID_INTERNAL`)
)
ENGINE=InnoDB;
