CREATE TABLE IF NOT EXISTS `GuildHouse` (
  `Id` int(255) default NULL,
  `Type` int(255) NOT NULL,
  `NextPayment` date default NULL,
  KEY `Id` (`Id`),
  KEY `Type` (`Type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `GuildHouseType` (
`Id` INT NOT NULL AUTO_INCREMENT ,
`Name` VARCHAR( 255 ) NOT NULL ,
`Tax` INT NOT NULL ,
PRIMARY KEY ( `Id` )
) ENGINE = InnoDB ;

ALTER TABLE `GuildHouse`
  ADD CONSTRAINT `GuildHouse_ibfk_1` FOREIGN KEY (`Type`) REFERENCES `GuildHouseType` (`Id`);