diff --git a/app/controllers/admin/courses.php b/app/controllers/admin/courses.php
index 711494a4ed0db26d2fae8335c63bc5a15d347172..e832628003eec1089b699894fc59b7f52c7e735e 100644
--- a/app/controllers/admin/courses.php
+++ b/app/controllers/admin/courses.php
@@ -291,10 +291,6 @@ class Admin_CoursesController extends AuthenticatedController
             PageLayout::postError(_('Sie wurden noch keiner Einrichtung zugeordnet'));
         }
 
-        if (!$GLOBALS['user']->cfg->MY_INSTITUTES_DEFAULT) {
-            $GLOBALS['user']->cfg->store('MY_INSTITUTES_DEFAULT', $this->insts[0]['Institut_id']);
-        }
-
         // Semester selection
         if ($GLOBALS['user']->cfg->MY_COURSES_SELECTED_CYCLE) {
             $this->semester = Semester::find($GLOBALS['user']->cfg->MY_COURSES_SELECTED_CYCLE);
diff --git a/db/migrations/5.1.35_set_configuration_my_institutes_default_to_all.php b/db/migrations/5.1.35_set_configuration_my_institutes_default_to_all.php
new file mode 100644
index 0000000000000000000000000000000000000000..d0a9ba4297e7488f0575e7ac2fb6f5537ab024ad
--- /dev/null
+++ b/db/migrations/5.1.35_set_configuration_my_institutes_default_to_all.php
@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * @author Jan-Hendrik Willms <tleilax+studip@gmail.com>
+ * @license GPL2 or any later version
+ *
+ * @see https://develop.studip.de/trac/ticket/7058
+ * @see https://gitlab.studip.de/studip/studip/-/issues/1656
+ */
+final class SetConfigurationMyInstitutesDefaultToAll extends Migration
+{
+    public function description()
+    {
+        return 'Changes the default value of configuration MY_INSTITUTES_DEFAULT to "all"';
+    }
+
+    protected function up()
+    {
+        $query = "UPDATE `config`
+                  SET `value` = 'all'
+                  WHERE `field` = 'MY_INSTITUTES_DEFAULT'";
+        DBManager::get()->exec($query);
+    }
+}