chief-nerd / Tabbie2

The Tabbie2 project main repo
https://www.tabbie.org
19 stars 10 forks source link

Basic schema lacks tournament.tabAlgorithmClass #9

Closed czlee closed 9 years ago

czlee commented 9 years ago

Migration works fine but trying to create a new tournament from the UI yields

Unknown Property – yii\base\UnknownPropertyException

Getting unknown property: common\models\Tournament::tabAlgorithmClass

Currently BasicStructure.sql says

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 =)

chief-nerd commented 9 years ago

Yes I will update the mysql code with the new version on Wednesday. This is the part I am currently working on.

chief-nerd commented 9 years ago

I updated the schema. It should work now.