CREATE TABLE IF NOT EXISTS `ImmoCity` ( 
`Id` int(11) NOT NULL AUTO_INCREMENT, 
`Name` TEXT  NOT NULL,
`Code` TEXT  NOT NULL,
`TitleEstimation` TEXT  NOT NULL,
`MetaEstimationDescription` TEXT  NOT NULL,
`DescriptionEstimation` TEXT  NOT NULL,
`TitleImmobilier` TEXT  NOT NULL,
`MetaImmobilierDescription` TEXT  NOT NULL,
`DescriptionImmobilier` TEXT  NOT NULL,
`NoResultDescription` TEXT  NOT NULL,
`RecentSale` TEXT  NOT NULL,
PRIMARY KEY (`Id`)
) ENGINE=InnoDB  DEFAULT CHARACTER SET `utf8`; 

CREATE TABLE IF NOT EXISTS `ImmoProject` ( 
`Id` int(11) NOT NULL AUTO_INCREMENT, 
`Name` TEXT  NOT NULL,
`Description` TEXT  NOT NULL,
`DateCreated` DATE  NULL ,
PRIMARY KEY (`Id`)
) ENGINE=InnoDB  DEFAULT CHARACTER SET `utf8`; 

CREATE TABLE IF NOT EXISTS `ImmoProjectUser` ( 
`Id` int(11) NOT NULL AUTO_INCREMENT, 
`ProjectId` INT  NOT NULL,
`UserId` INT  NOT NULL,
PRIMARY KEY (`Id`),
CONSTRAINT `ee_user_ImmoProjectUser` FOREIGN KEY (`UserId`) REFERENCES `ee_user`(`Id`),
CONSTRAINT `ImmoProject_ImmoProjectUser` FOREIGN KEY (`ProjectId`) REFERENCES `ImmoProject`(`Id`)
) ENGINE=InnoDB  DEFAULT CHARACTER SET `utf8`; 

CREATE TABLE IF NOT EXISTS `ImmoProjectEvent` ( 
`Id` int(11) NOT NULL AUTO_INCREMENT, 
`Name` TEXT  NOT NULL,
`DateEvent` DATE  NOT NULL,
`HourEvent` TEXT  NULL,
`Description` TEXT  NOT NULL,
`Result` TEXT  NULL,
`ProjectId` INT  NOT NULL,
PRIMARY KEY (`Id`),
CONSTRAINT `ImmoProject_ImmoProjectEvent` FOREIGN KEY (`ProjectId`) REFERENCES `ImmoProject`(`Id`)
) ENGINE=InnoDB  DEFAULT CHARACTER SET `utf8`; 

CREATE TABLE IF NOT EXISTS `ImmoProjectAnnonce` ( 
`Id` int(11) NOT NULL AUTO_INCREMENT, 
`ProjectId` INT  NOT NULL,
`AnnonceId` INT  NOT NULL,
PRIMARY KEY (`Id`)
) ENGINE=InnoDB  DEFAULT CHARACTER SET `utf8`; 