CREATE TABLE IF NOT EXISTS `tournament` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`url_slug` VARCHAR(100) NOT NULL,
`convenor_user_id` INT(11) UNSIGNED NOT NULL,
`tabmaster_user_id` INT(11) UNSIGNED NOT NULL,
`name` VARCHAR(100) NOT NULL,
`start_date` DATETIME NOT NULL,
`end_date` DATETIME NOT NULL,
`logo` VARCHAR(255) NULL,
`time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
INDEX `fk_tournament_user1_idx` (`convenor_user_id` ASC),
INDEX `fk_tournament_user2_idx` (`tabmaster_user_id` ASC),
UNIQUE INDEX `slug_UNIQUE` (`url_slug` ASC),
CONSTRAINT `fk_tournament_user1`
FOREIGN KEY (`convenor_user_id`)
REFERENCES `tabbie`.`user` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_tournament_user2`
FOREIGN KEY (`tabmaster_user_id`)
REFERENCES `tabbie`.`user` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
I'd add it to the schema but I don't know what type it's supposed to be =)
Migration works fine but trying to create a new tournament from the UI yields
Currently
BasicStructure.sql
saysI'd add it to the schema but I don't know what type it's supposed to be =)