Skip to content

Commit 7717f0b

Browse files
committed
Added CHARSET key into database db.
1 parent 816cee7 commit 7717f0b

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

bin/v_add_db_base

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ db_password=$4
2323
type=$5
2424
host=$6
2525
encoding=${7-UTF8}
26-
26+
encoding=$(echo "$encoding" |tr '[:lower:]' '[:upper:]')
2727
# Importing variables
2828
source $VESTA/conf/vars.conf
2929
source $V_CONF/vesta.conf
@@ -89,7 +89,7 @@ increase_user_value "$user" '$U_DATABASES'
8989

9090
# Adding db to db conf
9191
v_str="DB='$database' USER='$db_user' HOST='$host' TYPE='$type'"
92-
v_str="$v_str U_DISK='0' SUSPEND='no' DATE='$V_DATE'"
92+
v_str="$v_str LOCALE='$encoding' U_DISK='0' SUSPEND='no' DATE='$V_DATE'"
9393
echo "$v_str">>$V_USERS/$user/db.conf
9494

9595
# Hiding password

bin/v_list_db_base

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ is_db_valid
107107
conf=$V_USERS/$user/db.conf
108108

109109
# Defining fileds to select
110-
fields='$DB $USER $HOST $TYPE $U_DISK $SUSPEND $DATE'
110+
fields='$DB $USER $HOST $TYPE $CHARSET $U_DISK $SUSPEND $DATE'
111111

112112
# Listing database
113113
case $format in

bin/v_list_db_bases

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,14 @@ is_user_valid
4040
conf=$V_USERS/$user/db.conf
4141

4242
# Defining fileds to select
43-
fields='$DB $USER $HOST $TYPE $U_DISK $SUSPEND $DATE'
43+
fields='$DB $USER $HOST $TYPE $CHARSET $U_DISK $SUSPEND $DATE'
4444

4545
# Listing databases
4646
case $format in
4747
json) json_list ;;
4848
plain) nohead=1; shell_list ;;
49-
shell) shell_list | column -t ;;
49+
shell) fields='$DB $USER $HOST $TYPE $U_DISK $DATE';
50+
shell_list | column -t ;;
5051
*) check_args '1' '0' 'user [format]'
5152
esac
5253

0 commit comments

Comments
 (0)