mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Update mysql: add default_character_set option to ynh_mysql_dump_db
This commit is contained in:
parent
5babe3dce6
commit
85d5ed1284
1 changed files with 5 additions and 3 deletions
|
@ -136,13 +136,15 @@ ynh_mysql_drop_db() {
|
|||
# Requires YunoHost version 2.2.4 or higher.
|
||||
ynh_mysql_dump_db() {
|
||||
# Declare an array to define the options of this helper.
|
||||
local legacy_args=d
|
||||
local -A args_array=([d]=database=)
|
||||
local legacy_args=dc
|
||||
local -A args_array=( [d]=database= [c]=default_character_set= )
|
||||
local database
|
||||
local default_character_set
|
||||
# Manage arguments with getopts
|
||||
ynh_handle_getopts_args "$@"
|
||||
default_character_set="${default_character_set:-latin1}"
|
||||
|
||||
mysqldump --single-transaction --skip-dump-date --routines "$database"
|
||||
mysqldump --single-transaction --skip-dump-date --routines --default-character-set=$default_character_set "$database"
|
||||
}
|
||||
|
||||
# Create a user
|
||||
|
|
Loading…
Add table
Reference in a new issue