diff --git a/Scripts/bootargs.sh b/Scripts/bootargs.sh index 79eaf5fd5..0f2215f7c 100755 --- a/Scripts/bootargs.sh +++ b/Scripts/bootargs.sh @@ -7,21 +7,25 @@ red="\033[0;31m" green="\033[0;32m" orange="\033[0;33m" cyan="\033[0;36m" -#; Host name (unix) 'localhost' generally replaces '127.0.0.1' (macOS). export DATABASE_ENGINE="Mysql" export DATABASE_SERVICE_NAME="mysql" +#; Host name (unix) 'localhost' generally replaces '127.0.0.1' (macOS). #;export MYSQL_SERVICE_HOST="127.0.0.1" export MYSQL_SERVICE_HOST="localhost" export MYSQL_SERVICE_PORT="3306" +#; To override, use shell parameter -dbase= instead export DATABASE_NAME="phpcms" export DATABASE_USER="root" +#; To override, shell parameter -p= instead #;export DATABASE_PASSWORD="" #. Test configuration ?test=1, ./test_cake.sh #;export TEST_MYSQL_SERVICE_HOST="127.0.0.1" export TEST_MYSQL_SERVICE_HOST="localhost" export TEST_MYSQL_SERVICE_PORT="3306" +#; To override, use shell parameter -tbase= instead export TEST_DATABASE_NAME="cakephp_test" export TEST_DATABASE_USER="test" +#; To override, use shell parameter -t= instead #;export TEST_DATABASE_PASSWORD="" export FTP_SERVICE_HOST="localhost" export FTP_SERVICE_USER="test" diff --git a/migrate-database.sh b/migrate-database.sh index c23ff2a46..345034642 100755 --- a/migrate-database.sh +++ b/migrate-database.sh @@ -29,7 +29,7 @@ fix_socket="-Y" config_app_checked="" update_checked=0 import_identities=0 -identities=app/Config/database.sql +identities=app/Config/Schema/database.sql new_pass="" new_test_pass="" saved=("$*") @@ -112,7 +112,7 @@ if [[ -f $identities ]]; then source ./Scripts/cp_bkp_old.sh . $identities ${ide # configure user application database and eventually alter user database access [ -z $dbfile ] && [ $fix_socket == "-N" ] && [ -f app/Config/database.php ] || config_app_checked="-Y" shell_prompt "./Scripts/config_app_database.sh ${dbfile} ${fix_socket}" "${cyan}Setup ${dbfile} connection and socket\n${nc}" $config_app_checked -if [[ $import_identities ]]; then +if [[ $import_identities -eq 1 ]]; then echo -e "Importing the mysql ${cyan}${DATABASE_USER}${nc} and ${cyan}${TEST_DATABASE_USER}${nc} users SQL identities..." echo -e "\r${red}WARNING: You will modify SQL ${DATABASE_USER} password !${nc}" && parse_sql_password "$new_pass" "set_DATABASE_PASSWORD" "new ${DATABASE_USER}" && @@ -139,7 +139,7 @@ if [[ $import_identities ]]; then export DATABASE_PASSWORD=$set_DATABASE_PASSWORD export TEST_DATABASE_PASSWORD=$set_TEST_DATABASE_PASSWORD fi -if [[ $update_checked ]]; then +if [[ $update_checked -eq 1 ]]; then #; update plugins and dependencies source ./Scripts/composer.sh "-o" #; cakephp shell