Revert "fix checkpoint issue (#182)" (#188)

This reverts commit 1bb9a831af.
This commit is contained in:
Lukas Kremsmayr 2018-07-03 18:15:37 +02:00 committed by GitHub
parent 1bb9a831af
commit 77d79e17e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -174,7 +174,6 @@ class LocalRecordsPlugin implements ManialinkPageAnswerListener, CallbackListene
`playerIndex` int(11) NOT NULL,
`time` int(11) NOT NULL,
`changed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`checkpoints` text NOT NULL,
PRIMARY KEY (`index`),
UNIQUE KEY `player_map_record` (`mapIndex`,`playerIndex`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;";
@ -182,6 +181,13 @@ class LocalRecordsPlugin implements ManialinkPageAnswerListener, CallbackListene
if ($mysqli->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);
}
}
}
/**
@ -798,4 +804,4 @@ class LocalRecordsPlugin implements ManialinkPageAnswerListener, CallbackListene
$this->recordWidget->setLineHeight($lineHeight);
$this->updateManialink = true;
}
}
}