diff --git a/friendica-delete-old-users.sh b/friendica-delete-old-users.sh index 52daa1d..4668190 100755 --- a/friendica-delete-old-users.sh +++ b/friendica-delete-old-users.sh @@ -43,6 +43,7 @@ loop() { #Check if our dependencies are installed if [[ -n $(type curl) && -n "${dbengine}" && -n $(type "${dbengine}") && -n $(type date) ]]; then date + "${dbengine}" "${db}" -N -B -q -e "alter table \`contact\` add index if not exists \`contact_baseurl\` (baseurl)" "${dbengine}" "${db}" -N -B -q -e \ "select \`id\`, \`nick\`, \`baseurl\` from contact c where \ c.\`id\` not in (select \`cid\` from \`user-contact\`) and \ @@ -63,5 +64,6 @@ if [[ -n $(type curl) && -n "${dbengine}" && -n $(type "${dbengine}") && -n $(ty "${dbengine}" "${db}" -N -B -q -e "alter table \`post\` auto_increment = 1" "${dbengine}" "${db}" -N -B -q -e "alter table \`photo\` auto_increment = 1" "${dbengine}" "${db}" -N -B -q -e "alter table \`contact\` auto_increment = 1" + "${dbengine}" "${db}" -N -B -q -e "alter table \`contact\` drop index \`contact_baseurl\`" date fi diff --git a/friendica-find-missing-servers.sh b/friendica-find-missing-servers.sh index 6ac35a5..72e579c 100755 --- a/friendica-find-missing-servers.sh +++ b/friendica-find-missing-servers.sh @@ -73,6 +73,7 @@ loop_3() { #Check if our dependencies are installed if [[ -n $(type curl) && -n "${dbengine}" && -n $(type "${dbengine}") && -n $(type date) ]]; then date + "${dbengine}" "${db}" -N -B -q -e "alter table \`contact\` add index if not exists \`contact_baseurl\` (baseurl)" if [[ ! -f "${tmpfile}" ]]; then echo "Listing sites" siteslist=$("${dbengine}" "${db}" -N -B -q -e "select distinct baseurl, protocol from contact where baseurl != ''" | sort -b -f -n | sed -e "s/http:/https:/g" | uniq -i) @@ -120,5 +121,6 @@ if [[ -n $(type curl) && -n "${dbengine}" && -n $(type "${dbengine}") && -n $(ty "${dbengine}" "${db}" -N -B -q -e "alter table \`post\` auto_increment = 1" "${dbengine}" "${db}" -N -B -q -e "alter table \`photo\` auto_increment = 1" "${dbengine}" "${db}" -N -B -q -e "alter table \`contact\` auto_increment = 1" + "${dbengine}" "${db}" -e "alter table contact drop index \`contact_baseurl\`" date fi