DROP TABLE IF EXISTS `AC_GROUP_OWNERSHIP`;
CREATE TABLE `AC_GROUP_OWNERSHIP` (
	`ID_INTERNAL` int NOT NULL auto_increment,
	`KEY_OWNER` int NOT NULL,
	`KEY_GROUP` int NOT NULL,
	PRIMARY KEY (`ID_INTERNAL`)
)TYPE=InnoDB;

DROP TABLE IF EXISTS `AC_GROUP_DIFFERENCE`;
CREATE TABLE `AC_GROUP_DIFFERENCE` (
	`ID_INTERNAL` int NOT NULL auto_increment, 
	`CREATION_DATE` timestamp NOT NULL,
	`KEY_CREATOR` int NOT NULL,
	`KEY_MAILING_LIST` int,		
	`KEY_WRITERS_GROUP` int,
	`KEY_READERS_GROUP` int,
	`NAME` text,
	`DESCRIPTION` text,
    PRIMARY KEY (`ID_INTERNAL`)
)TYPE=InnoDB;

DROP TABLE IF EXISTS `AC_GROUP_UNION`;
CREATE TABLE `AC_GROUP_UNION` (
	`ID_INTERNAL` int NOT NULL auto_increment, 
	`CREATION_DATE` timestamp NOT NULL,	
	`KEY_CREATOR` int NOT NULL,
	`KEY_MAILING_LIST` int,			
	`KEY_WRITERS_GROUP` int,
	`KEY_READERS_GROUP` int,	
	`NAME` text ,
	`DESCRIPTION` text,	
    PRIMARY KEY (`ID_INTERNAL`)
)TYPE=InnoDB;

DROP TABLE IF EXISTS `AC_GROUP_INTERSECTION`;
CREATE TABLE `AC_GROUP_INTERSECTION` (
	`ID_INTERNAL` int NOT NULL auto_increment, 
	`CREATION_DATE` timestamp NOT NULL,	
	`KEY_CREATOR` int NOT NULL,
	`KEY_MAILING_LIST` int,	
	`KEY_WRITERS_GROUP` int,
	`KEY_READERS_GROUP` int,			
	`NAME` text ,
	`DESCRIPTION` text,	
    PRIMARY KEY (`ID_INTERNAL`)
)TYPE=InnoDB;

DROP TABLE IF EXISTS `AC_EXECUTION_COURSE_STUDENTS_GROUP`;
CREATE TABLE `AC_EXECUTION_COURSE_STUDENTS_GROUP` (
	`ID_INTERNAL` int NOT NULL auto_increment,
	`CREATION_DATE` timestamp NOT NULL,	
	`KEY_CREATOR` int NOT NULL,
	`KEY_MAILING_LIST` int,		
	`KEY_WRITERS_GROUP` int,
	`KEY_READERS_GROUP` int,		
	`KEY_EXECUTION_COURSE`int NOT NULL,
	`NAME` text ,
	`DESCRIPTION` text,	
    PRIMARY KEY (`ID_INTERNAL`)
)TYPE=InnoDB;

DROP TABLE IF EXISTS `AC_EXECUTION_COURSE_TEACHERS_GROUP`;
CREATE TABLE `AC_EXECUTION_COURSE_TEACHERS_GROUP` (
	`ID_INTERNAL` int NOT NULL auto_increment, 
	`CREATION_DATE` timestamp NOT NULL,	
	`KEY_CREATOR` int NOT NULL,
	`KEY_MAILING_LIST` int,		
	`KEY_WRITERS_GROUP` int,
	`KEY_READERS_GROUP` int,	
	`KEY_EXECUTION_COURSE`int NOT NULL,	
	`NAME` text ,
	`DESCRIPTION` text ,	
    PRIMARY KEY (`ID_INTERNAL`)
)TYPE=InnoDB;

DROP TABLE IF EXISTS `AC_PERSON_GROUP`;
CREATE TABLE `AC_PERSON_GROUP` (
	`ID_INTERNAL` int NOT NULL auto_increment, 
	`CREATION_DATE` timestamp NOT NULL,	
	`KEY_CREATOR` int NOT NULL,
	`KEY_MAILING_LIST` int,		
	`KEY_PERSON` int NOT NULL,			
	`KEY_WRITERS_GROUP` int,
	`KEY_READERS_GROUP` int,		
	`NAME` text ,
	`DESCRIPTION` text,	
    PRIMARY KEY (`ID_INTERNAL`)
)TYPE=InnoDB;

DROP TABLE IF EXISTS `AC_ROLE_GROUP`;
CREATE TABLE `AC_ROLE_GROUP` (
	`ID_INTERNAL` int NOT NULL auto_increment, 
	`CREATION_DATE` timestamp NOT NULL,	
	`KEY_CREATOR` int NOT NULL,
	`KEY_MAILING_LIST` int,		
	`KEY_ROLE` int NOT NULL,			
	`KEY_WRITERS_GROUP` int,
	`KEY_READERS_GROUP` int,		
	`NAME` text ,
	`DESCRIPTION` text ,	
    PRIMARY KEY (`ID_INTERNAL`)
)TYPE=InnoDB;


DROP TABLE IF EXISTS `AC_PUBLIC_REQUESTER_GROUP`;
CREATE TABLE `AC_PUBLIC_REQUESTER_GROUP` (
	`ID_INTERNAL` int NOT NULL auto_increment, 
	`CREATION_DATE` timestamp NOT NULL,	
	`KEY_CREATOR` int NOT NULL,
	`KEY_MAILING_LIST` int,		
	`KEY_WRITERS_GROUP` int,
	`KEY_READERS_GROUP` int,		
	`NAME` text ,
	`DESCRIPTION` text,	
    PRIMARY KEY (`ID_INTERNAL`)
)TYPE=InnoDB;


DROP TABLE IF EXISTS `AC_USER_GROUP_AGGREGATION`;
CREATE TABLE `AC_USER_GROUP_AGGREGATION` (
    `ID_INTERNAL` int NOT NULL auto_increment,
	`KEY_PART` int NOT NULL,
	`KEY_AGGREGATOR` int NOT NULL,
	PRIMARY KEY (`ID_INTERNAL`)
)TYPE=InnoDB;