mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
Create sh
This commit is contained in:
parent
e93694b2be
commit
0d8ebd3e45
12
version/1.3.7/UPDATE/sh
Normal file
12
version/1.3.7/UPDATE/sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
DB_CONFIG_FILE="/usr/local/opencli/db.sh"
|
||||
. "$DB_CONFIG_FILE"
|
||||
|
||||
COLUMN_EXISTS=$(mysql --defaults-extra-file=/etc/my.cnf -D panel -sN -e "SHOW COLUMNS FROM plans LIKE 'feature_set';")
|
||||
|
||||
if [ -z "$COLUMN_EXISTS" ]; then
|
||||
mysql --defaults-extra-file=$config_file -D "$mysql_database" -e "ALTER TABLE plans ADD COLUMN feature_set VARCHAR(255) DEFAULT 'default';"
|
||||
fi
|
||||
|
||||
mysql --defaults-extra-file=$config_file -D "$mysql_database" -e "UPDATE plans SET feature_set = 'default';"
|
Loading…
Reference in New Issue
Block a user