Update UPDATE.sh

This commit is contained in:
Stefan Pejcic 2024-09-25 17:30:30 +02:00 committed by GitHub
parent bee1d3e681
commit e8baf9ed94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -146,20 +146,21 @@ print_space_and_line() {
add_server_column_to_mysql() {
echo "Adding 'server' column to users table in the database. This column will be used for the Clustering feature in the future."
echo "Adding 'server' column to users table in the database. This column will be used for Clustering feature in the future."
mysql_query="ALTER TABLE users ADD COLUMN `server` VARCHAR(255) DEFAULT 'default';"
mysql_query="ALTER TABLE users ADD COLUMN server VARCHAR(255) DEFAULT 'default';"
mysql -D "panel" -e "$mysql_query"
if [ $? -eq 0 ]; then
echo "Successfully added new column 'server' to users table."
echo "Successfully added 'server' column to the users table."
else
echo "Error: Data insertion failed."
echo "Please run this mysql query manually: ALTER TABLE users ADD COLUMN `server` VARCHAR(255) DEFAULT 'default';"
echo "Error: Failed to add 'server' column to the users table."
echo "Please run the following MySQL query manually:"
echo "$mysql_query"
fi
}
update_configuration_files() {
echo "Updating configuration files in /etc/openpanel/"
cd /etc/openpanel && git pull