diff --git a/scripts/change_url b/scripts/change_url index a29b4c2..06f8916 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -88,70 +88,6 @@ sed --in-place "s@REMOTE_USER_PROTECTED_PATH = \['$old_path', '$old_path/account ynh_script_progression --message="Updating seafile database" --weight=7 -# Update database - -# This fonction relplace all old domain name by the new domain name. -# use : mysql_relpace_db db_name table collum -mysql_relpace_db() { - sql_request='UPDATE `'"$2"'` SET '"$3 = replace($3, '$old_domain', '$domain')" - ynh_mysql_execute_as_root --sql "$sql_request" --database $1 -} - -# ccnet DB -mysql_relpace_db ccnetdb EmailUser email -mysql_relpace_db ccnetdb Group creator_name -mysql_relpace_db ccnetdb GroupUser user_name -mysql_relpace_db ccnetdb LDAPUsers email -mysql_relpace_db ccnetdb Organization creator -mysql_relpace_db ccnetdb OrgUser email -mysql_relpace_db ccnetdb UserRole email - -# seafile DB -mysql_relpace_db seafiledb OrgUserQuota user -mysql_relpace_db seafiledb RepoGroup user_name -mysql_relpace_db seafiledb RepoOwner owner_id -mysql_relpace_db seafiledb RepoTrash owner_id -mysql_relpace_db seafiledb RepoUserToken email -mysql_relpace_db seafiledb SharedRepo from_email -mysql_relpace_db seafiledb SharedRepo to_email -mysql_relpace_db seafiledb UserQuota user -mysql_relpace_db seafiledb UserShareQuota user - -# seahub DB -mysql_relpace_db seahubdb api2_token user -mysql_relpace_db seahubdb api2_tokenv2 user -mysql_relpace_db seahubdb avatar_avatar emailuser -mysql_relpace_db seahubdb base_clientlogintoken username -mysql_relpace_db seahubdb base_devicetoken user -mysql_relpace_db seahubdb base_filecomment author -mysql_relpace_db seahubdb base_innerpubmsg from_email -mysql_relpace_db seahubdb base_innerpubmsgreply from_email -mysql_relpace_db seahubdb base_userenabledmodule username -mysql_relpace_db seahubdb base_userlastlogin username -mysql_relpace_db seahubdb base_userstarredfiles email -mysql_relpace_db seahubdb group_groupmessage from_email -mysql_relpace_db seahubdb group_messagereply from_email -mysql_relpace_db seahubdb institutions_institutionadmin user -mysql_relpace_db seahubdb notifications_usernotification to_user -mysql_relpace_db seahubdb options_useroptions email -mysql_relpace_db seahubdb post_office_attachment_emails email_id -mysql_relpace_db seahubdb post_office_email from_email -mysql_relpace_db seahubdb profile_profile user -mysql_relpace_db seahubdb profile_profile login_id -mysql_relpace_db seahubdb profile_profile contact_email -mysql_relpace_db seahubdb registration_registrationprofile emailuser_id -mysql_relpace_db seahubdb share_anonymousshare repo_owner -mysql_relpace_db seahubdb share_fileshare username -mysql_relpace_db seahubdb share_privatefiledirshare from_user -mysql_relpace_db seahubdb share_privatefiledirshare to_user -mysql_relpace_db seahubdb share_uploadlinkshare username -mysql_relpace_db seahubdb sysadmin_extra_userloginlog username -mysql_relpace_db seahubdb termsandconditions_usertermsandconditions username -mysql_relpace_db seahubdb two_factor_phonedevice user -mysql_relpace_db seahubdb two_factor_staticdevice user -mysql_relpace_db seahubdb two_factor_totpdevice user -mysql_relpace_db seahubdb wiki_personalwiki username - # Avoid the current effect sleep 2