switch from MySQL to PostgreSQL
MySQL version not compatible. version provided: 10.1.37 / version requested: 10.2.7
This commit is contained in:
@@ -100,7 +100,7 @@ ynh_install_app_dependencies redis-server
|
||||
ynh_install_nodejs 10
|
||||
|
||||
#=================================================
|
||||
# CREATE A MYSQL DATABASE
|
||||
# CREATE A POSTGRESQL DATABASE
|
||||
#=================================================
|
||||
|
||||
### Use these lines if you need a database for the application.
|
||||
@@ -108,13 +108,17 @@ ynh_install_nodejs 10
|
||||
### The password will be stored as 'mysqlpwd' into the app settings,
|
||||
### and will be available as $db_pwd
|
||||
### If you're not using these lines:
|
||||
### - Remove the section "BACKUP THE MYSQL DATABASE" in the backup script
|
||||
### - Remove also the section "REMOVE THE MYSQL DATABASE" in the remove script
|
||||
### - As well as the section "RESTORE THE MYSQL DATABASE" in the restore script
|
||||
### - Remove the section "BACKUP THE POSTGRESQL DATABASE" in the backup script
|
||||
### - Remove also the section "REMOVE THE POSTGRESQL DATABASE" in the remove script
|
||||
### - As well as the section "RESTORE THE POSTGRESQL DATABASE" in the restore script
|
||||
|
||||
db_name=$(ynh_sanitize_dbid $app)
|
||||
ynh_app_setting_set $app db_name $db_name
|
||||
ynh_mysql_setup_db $db_name $db_name
|
||||
db_pwd=$(ynh_string_random 30)
|
||||
ynh_app_setting_set "$app" psql_db "$db_name"
|
||||
ynh_app_setting_set "$app" psqlpwd "$db_pwd"
|
||||
ynh_psql_test_if_first_run
|
||||
ynh_psql_create_user "$db_name" "$db_pwd"
|
||||
ynh_psql_create_db "$db_name" "$db_name" "$db_pwd"
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
||||
Reference in New Issue
Block a user