en mode mysql upgrade la database en mode mysql

This commit is contained in:
Emmanuel Garette 2019-02-21 14:10:54 +01:00
parent 8c28ae6e6b
commit 3a74f7932c

View File

@ -33,7 +33,13 @@ function updateDB()
if [[ -f ${dbfile} ]]
then
if [ $(CreoleGet one_database_type) = "mysql" ]; then
if [ $(CreoleGet one_ha_server_index 0) = "0" ]; then
$cmd sqlite2mysql -u $USER -p $PASS -d $DB -S $HOST
fi
else
$cmd upgrade -f -s ${dbfile}
fi
res=${?}
clean_backups ${dbfile}
return ${res}
@ -62,10 +68,10 @@ function to_mysql() {
fi
}
echo
to_mysql
echo
EchoGras "Mise à jour de la base de données ONE"
echo
updateDB
echo
to_mysql
exit ${?}