fixed the database construction in plugins/plugin.localdatabase.php

This commit is contained in:
Hendrik Boll 2019-05-12 19:37:45 +02:00
parent 96fa8ef80a
commit 95d00cc8c2
2 changed files with 4 additions and 9 deletions

View File

@ -13,11 +13,6 @@ then
fi fi
# Evaluate the available environment variables # Evaluate the available environment variables
if [[ -z "${MASTERADMIN_LOGIN}" ]]
then
echo "No ingame MasterAdmin was specified."
MASTERADMIN_LOGIN="_placeholder_"
fi
if [[ -z "${SERVER_SA_PASSWORD}" ]] if [[ -z "${SERVER_SA_PASSWORD}" ]]
then then
echo "No SuperAdmin password was specified. Xaseco cannot build a connection without this information." echo "No SuperAdmin password was specified. Xaseco cannot build a connection without this information."
@ -49,8 +44,7 @@ fi
#Xaseco Files #Xaseco Files
sed -i -e "s/--\$MASTERADMIN_LOGIN--/$MASTERADMIN_LOGIN/" \ sed -i -e "s/--\$SERVER_SA_PASSWORD--/$SERVER_SA_PASSWORD/" \
-e "s/--\$SERVER_SA_PASSWORD--/$SERVER_SA_PASSWORD/" \
/opt/xaseco/config.xml /opt/xaseco/config.xml
sed -i -e "s/--\$DB_HOST--/$DB_HOST/" \ sed -i -e "s/--\$DB_HOST--/$DB_HOST/" \
-e "s/--\$DB_LOGIN--/$DB_LOGIN/" \ -e "s/--\$DB_LOGIN--/$DB_LOGIN/" \

View File

@ -88,6 +88,7 @@ function ldb_connect($aseco) {
$query = "CREATE TABLE IF NOT EXISTS `challenges` ( $query = "CREATE TABLE IF NOT EXISTS `challenges` (
`Id` mediumint(9) NOT NULL auto_increment, `Id` mediumint(9) NOT NULL auto_increment,
`Uid` varchar(27) NOT NULL default '', `Uid` varchar(27) NOT NULL default '',
`Date` datetime NOT NULL default '1970-01-01 00:00:00',
`Name` varchar(100) NOT NULL default '', `Name` varchar(100) NOT NULL default '',
`Author` varchar(30) NOT NULL default '', `Author` varchar(30) NOT NULL default '',
`Environment` varchar(10) NOT NULL default '', `Environment` varchar(10) NOT NULL default '',
@ -102,7 +103,7 @@ function ldb_connect($aseco) {
`Game` varchar(3) NOT NULL default '', `Game` varchar(3) NOT NULL default '',
`NickName` varchar(100) NOT NULL default '', `NickName` varchar(100) NOT NULL default '',
`Nation` varchar(3) NOT NULL default '', `Nation` varchar(3) NOT NULL default '',
`UpdatedAt` datetime NOT NULL default '0000-00-00 00:00:00', `UpdatedAt` datetime NOT NULL default '1970-01-01 00:00:00',
`Wins` mediumint(9) NOT NULL default 0, `Wins` mediumint(9) NOT NULL default 0,
`TimePlayed` int(10) unsigned NOT NULL default 0, `TimePlayed` int(10) unsigned NOT NULL default 0,
`TeamName` char(60) NOT NULL default '', `TeamName` char(60) NOT NULL default '',
@ -117,7 +118,7 @@ function ldb_connect($aseco) {
`ChallengeId` mediumint(9) NOT NULL default 0, `ChallengeId` mediumint(9) NOT NULL default 0,
`PlayerId` mediumint(9) NOT NULL default 0, `PlayerId` mediumint(9) NOT NULL default 0,
`Score` int(11) NOT NULL default 0, `Score` int(11) NOT NULL default 0,
`Date` datetime NOT NULL default '0000-00-00 00:00:00', `Date` datetime NOT NULL default '1970-01-01 00:00:00',
`Checkpoints` text NOT NULL, `Checkpoints` text NOT NULL,
PRIMARY KEY (`Id`), PRIMARY KEY (`Id`),
UNIQUE KEY `PlayerId` (`PlayerId`,`ChallengeId`), UNIQUE KEY `PlayerId` (`PlayerId`,`ChallengeId`),