fixed the database construction in plugins/plugin.localdatabase.php
This commit is contained in:
parent
96fa8ef80a
commit
95d00cc8c2
|
@ -13,11 +13,6 @@ then
|
|||
fi
|
||||
|
||||
# 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}" ]]
|
||||
then
|
||||
echo "No SuperAdmin password was specified. Xaseco cannot build a connection without this information."
|
||||
|
@ -49,8 +44,7 @@ fi
|
|||
|
||||
#Xaseco Files
|
||||
|
||||
sed -i -e "s/--\$MASTERADMIN_LOGIN--/$MASTERADMIN_LOGIN/" \
|
||||
-e "s/--\$SERVER_SA_PASSWORD--/$SERVER_SA_PASSWORD/" \
|
||||
sed -i -e "s/--\$SERVER_SA_PASSWORD--/$SERVER_SA_PASSWORD/" \
|
||||
/opt/xaseco/config.xml
|
||||
sed -i -e "s/--\$DB_HOST--/$DB_HOST/" \
|
||||
-e "s/--\$DB_LOGIN--/$DB_LOGIN/" \
|
||||
|
|
|
@ -88,6 +88,7 @@ function ldb_connect($aseco) {
|
|||
$query = "CREATE TABLE IF NOT EXISTS `challenges` (
|
||||
`Id` mediumint(9) NOT NULL auto_increment,
|
||||
`Uid` varchar(27) NOT NULL default '',
|
||||
`Date` datetime NOT NULL default '1970-01-01 00:00:00',
|
||||
`Name` varchar(100) NOT NULL default '',
|
||||
`Author` varchar(30) NOT NULL default '',
|
||||
`Environment` varchar(10) NOT NULL default '',
|
||||
|
@ -102,7 +103,7 @@ function ldb_connect($aseco) {
|
|||
`Game` varchar(3) NOT NULL default '',
|
||||
`NickName` varchar(100) 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,
|
||||
`TimePlayed` int(10) unsigned NOT NULL default 0,
|
||||
`TeamName` char(60) NOT NULL default '',
|
||||
|
@ -117,7 +118,7 @@ function ldb_connect($aseco) {
|
|||
`ChallengeId` mediumint(9) NOT NULL default 0,
|
||||
`PlayerId` mediumint(9) 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,
|
||||
PRIMARY KEY (`Id`),
|
||||
UNIQUE KEY `PlayerId` (`PlayerId`,`ChallengeId`),
|
||||
|
|
Loading…
Reference in New Issue