fix checkpoint issue (#182)

This commit is contained in:
mustywzki 2018-07-03 18:13:11 +02:00 committed by Lukas Kremsmayr
parent bded439c03
commit 1bb9a831af

View File

@ -174,6 +174,7 @@ class LocalRecordsPlugin implements ManialinkPageAnswerListener, CallbackListene
`playerIndex` int(11) NOT NULL, `playerIndex` int(11) NOT NULL,
`time` int(11) NOT NULL, `time` int(11) NOT NULL,
`changed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `changed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`checkpoints` text NOT NULL,
PRIMARY KEY (`index`), PRIMARY KEY (`index`),
UNIQUE KEY `player_map_record` (`mapIndex`,`playerIndex`) UNIQUE KEY `player_map_record` (`mapIndex`,`playerIndex`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;"; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;";
@ -181,13 +182,6 @@ class LocalRecordsPlugin implements ManialinkPageAnswerListener, CallbackListene
if ($mysqli->error) { if ($mysqli->error) {
trigger_error($mysqli->error, E_USER_ERROR); trigger_error($mysqli->error, E_USER_ERROR);
} }
$mysqli->query("ALTER TABLE `" . self::TABLE_RECORDS . "` ADD `checkpoints` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL");
if ($mysqli->error) {
if (!strstr($mysqli->error, 'Duplicate')) {
trigger_error($mysqli->error, E_USER_ERROR);
}
}
} }
/** /**
@ -804,4 +798,4 @@ class LocalRecordsPlugin implements ManialinkPageAnswerListener, CallbackListene
$this->recordWidget->setLineHeight($lineHeight); $this->recordWidget->setLineHeight($lineHeight);
$this->updateManialink = true; $this->updateManialink = true;
} }
} }