From 4f00fb8d9fea5ceead39a8145ac10d859ebdd287 Mon Sep 17 00:00:00 2001 From: Thomas Hackl Date: Wed, 7 Jan 2026 12:03:58 +0100 Subject: =?UTF-8?q?Resolve=20"Falsche=20Nummerierung=20f=C3=BCr=20Migratio?= =?UTF-8?q?n=206.1.17"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #6146 Merge request studip/studip!4661 --- db/migrations/6.1.17_create_forum_help_tour.php | 156 ++++++++++++++++++++++++ db/migrations/6.1.17_step_4756.php | 53 -------- db/migrations/6.1.18_create_forum_help_tour.php | 156 ------------------------ db/migrations/6.2.5_step_4756.php | 53 ++++++++ 4 files changed, 209 insertions(+), 209 deletions(-) create mode 100644 db/migrations/6.1.17_create_forum_help_tour.php delete mode 100644 db/migrations/6.1.17_step_4756.php delete mode 100644 db/migrations/6.1.18_create_forum_help_tour.php create mode 100644 db/migrations/6.2.5_step_4756.php diff --git a/db/migrations/6.1.17_create_forum_help_tour.php b/db/migrations/6.1.17_create_forum_help_tour.php new file mode 100644 index 0000000..85d0da8 --- /dev/null +++ b/db/migrations/6.1.17_create_forum_help_tour.php @@ -0,0 +1,156 @@ +exec( + "INSERT IGNORE INTO `help_tours` VALUES ( + '33fa547967cfa9b7edab321f5d8ca744', + 'ea68d2f9d7b81d01d2d3ea38a105c734', + 'Forum - Der Einstieg', + '6.1 - Die Tour durch das noch leere Forum.', + 'tour', + 'autor,tutor,dozent,admin,root', + 1, + 'de', + '6.1', + '', + '', + UNIX_TIMESTAMP(), + UNIX_TIMESTAMP() + )" + ); + DBManager::get()->exec( + "INSERT IGNORE INTO `help_tour_settings` VALUES ( + 'ea68d2f9d7b81d01d2d3ea38a105c734', + 1, + 'autostart_once', + UNIX_TIMESTAMP(), + UNIX_TIMESTAMP() + )" + ); + + $steps = [ + [ + 'step' => 1, + 'title' => 'Willkommen!', + 'tip' => 'Hier ist ein Ort für Diskussionen, Ankündigungen und gemeinsames Arbeiten.', + 'orientation' => 'B', + 'css_selector' => '#nav_course_forum > a:nth-child(1)', + 'route' => 'dispatch.php/course/forum/topics', + ], + [ + 'step' => 2, + 'title' => 'Diskussion starten', + 'tip' => 'Beginnen Sie im Aktionsmenü eine Diskussion zu einem bestehenden oder neuen Thema.', + 'orientation' => 'R', + 'css_selector' => '#link-430746eaab49d0ff0bcac73c2bc7a0a7 > a:nth-child(1)', + 'route' => 'dispatch.php/course/forum/topics', + ], + [ + 'step' => 3, + 'title' => 'Themenübersicht', + 'tip' => 'Ein Thema ist ein Überordner, der mehrere Diskussionen enthält. Dies ist zugleich die Startseite des Forums.', + 'orientation' => 'R', + 'css_selector' => '#nav_forum_topics', + 'route' => 'dispatch.php/course/forum/topics', + ], + [ + 'step' => 4, + 'title' => 'Alle Diskussionen', + 'tip' => 'Hier finden Sie eine Übersicht aller stattfindenden Diskussionen.', + 'orientation' => 'R', + 'css_selector' => '#nav_forum_discussions', + 'route' => 'dispatch.php/course/forum/topics', + ], + [ + 'step' => 5, + 'title' => 'Letzte Aktivität', + 'tip' => 'Die neuesten Beiträge finden Sie, indem Sie alle Diskussionen absteigend nach „Letzte Aktivität“ sortieren.', + 'orientation' => 'B', + 'css_selector' => '.sortdesc', + 'route' => 'dispatch.php/course/forum/discussions', + ], + [ + 'step' => 6, + 'title' => 'Abonnements', + 'tip' => 'Welche Themen und Beiträge verfolgen Sie?', + 'orientation' => 'R', + 'css_selector' => '#nav_forum_subscriptions', + 'route' => 'dispatch.php/course/forum/topics', + ], + [ + 'step' => 7, + 'title' => 'Kategorien', + 'tip' => 'Sie fassen mehrere Themen zusammen und sind optional.', + 'orientation' => 'B', + 'css_selector' => '#nav_forum_categories', + 'route' => 'dispatch.php/course/forum/topics', + ], + [ + 'step' => 8, + 'title' => 'Tour & Hilfe', + 'tip' => 'Diese Tour und weitere Hilfeseiten finden Sie hier.', + 'orientation' => 'B', + 'css_selector' => '#helpbar_icon > svg:nth-child(1)', + 'route' => 'dispatch.php/course/forum/topics', + ], + [ + 'step' => 9, + 'title' => 'Auf in den Austausch!', + 'tip' => 'Worüber wollen Sie diskutieren?', + 'orientation' => 'B', + 'css_selector' => 'a.button--icon-label', + 'route' => 'dispatch.php/course/forum/topics', + ] + ]; + $stmt = DBManager::get()->prepare( + "INSERT IGNORE INTO `help_tour_steps` + VALUES + ( + :tour_id, + :step, + :title, + :tip, + :orientation, + :interactive, + :css_selector, + :route, + :action_prev, + :action_next, + :author_email, + :mkdate, + :chdate + )" + ); + $meta = [ + 'tour_id' => 'ea68d2f9d7b81d01d2d3ea38a105c734', + 'interactive' => 0, + 'action_prev' => '', + 'action_next' => '', + 'author_email' => '', + 'mkdate' => time(), + 'chdate' => time() + ]; + foreach ($steps as $step) { + $stmt->execute(array_merge($meta, $step)); + } + } + + public function down() + { + $tour = ['tour_id' => 'ea68d2f9d7b81d01d2d3ea38a105c734']; + DBManager::get()->execute("DELETE FROM `help_tours` WHERE `tour_id` = :tour_id", $tour); + DBManager::get()->execute("DELETE FROM `help_tour_steps` WHERE `tour_id` = :tour_id", $tour); + DBManager::get()->execute("DELETE FROM `help_tour_settings` WHERE `tour_id` = :tour_id", $tour); + } + +} diff --git a/db/migrations/6.1.17_step_4756.php b/db/migrations/6.1.17_step_4756.php deleted file mode 100644 index fa9abcb..0000000 --- a/db/migrations/6.1.17_step_4756.php +++ /dev/null @@ -1,53 +0,0 @@ -exec("CREATE TABLE IF NOT EXISTS `masswidget` ( - `id` INT NOT NULL AUTO_INCREMENT, - `name` VARCHAR(255) NOT NULL, - `author_id` CHAR(32) COLLATE latin1_bin NOT NULL, - `target` ENUM('all', 'students', 'employees', 'lecturers', 'courses', 'usernames') COLLATE latin1_bin, - `settings` LONGTEXT, - `exclude_users` LONGTEXT, - `plugin_id` INT UNSIGNED NOT NULL, - `row` TINYINT UNSIGNED DEFAULT 0, - `col` TINYINT UNSIGNED DEFAULT 0, - `mkdate` INT UNSIGNED NOT NULL, - `chdate` INT UNSIGNED NOT NULL, - PRIMARY KEY (`id`), - INDEX author_id (`author_id`) - )"); - - DBManager::get()->exec("CREATE TABLE IF NOT EXISTS `masswidget_filter` ( - `masswidget_id` INT NOT NULL, - `filter_id` CHAR(32) COLLATE latin1_bin NOT NULL, - `mkdate` INT UNSIGNED NOT NULL, - PRIMARY KEY (`masswidget_id`, `filter_id`), - INDEX filter_id (`filter_id`) - )"); - - DBManager::get()->exec("ALTER TABLE `widget_user` - ADD COLUMN `is_active` TINYINT(1) UNSIGNED DEFAULT 1, - ADD COLUMN `chdate` INT UNSIGNED NOT NULL"); - } - - protected function down() - { - DBManager::get()->exec(" - DROP TABLE IF EXISTS - `masswidget_filter`, - `masswidget` - "); - - DBManager::get()->exec("ALTER TABLE `widget_user` - DROP COLUMN `is_active`, - DROP COLUMN `chdate`"); - } -}; diff --git a/db/migrations/6.1.18_create_forum_help_tour.php b/db/migrations/6.1.18_create_forum_help_tour.php deleted file mode 100644 index 85d0da8..0000000 --- a/db/migrations/6.1.18_create_forum_help_tour.php +++ /dev/null @@ -1,156 +0,0 @@ -exec( - "INSERT IGNORE INTO `help_tours` VALUES ( - '33fa547967cfa9b7edab321f5d8ca744', - 'ea68d2f9d7b81d01d2d3ea38a105c734', - 'Forum - Der Einstieg', - '6.1 - Die Tour durch das noch leere Forum.', - 'tour', - 'autor,tutor,dozent,admin,root', - 1, - 'de', - '6.1', - '', - '', - UNIX_TIMESTAMP(), - UNIX_TIMESTAMP() - )" - ); - DBManager::get()->exec( - "INSERT IGNORE INTO `help_tour_settings` VALUES ( - 'ea68d2f9d7b81d01d2d3ea38a105c734', - 1, - 'autostart_once', - UNIX_TIMESTAMP(), - UNIX_TIMESTAMP() - )" - ); - - $steps = [ - [ - 'step' => 1, - 'title' => 'Willkommen!', - 'tip' => 'Hier ist ein Ort für Diskussionen, Ankündigungen und gemeinsames Arbeiten.', - 'orientation' => 'B', - 'css_selector' => '#nav_course_forum > a:nth-child(1)', - 'route' => 'dispatch.php/course/forum/topics', - ], - [ - 'step' => 2, - 'title' => 'Diskussion starten', - 'tip' => 'Beginnen Sie im Aktionsmenü eine Diskussion zu einem bestehenden oder neuen Thema.', - 'orientation' => 'R', - 'css_selector' => '#link-430746eaab49d0ff0bcac73c2bc7a0a7 > a:nth-child(1)', - 'route' => 'dispatch.php/course/forum/topics', - ], - [ - 'step' => 3, - 'title' => 'Themenübersicht', - 'tip' => 'Ein Thema ist ein Überordner, der mehrere Diskussionen enthält. Dies ist zugleich die Startseite des Forums.', - 'orientation' => 'R', - 'css_selector' => '#nav_forum_topics', - 'route' => 'dispatch.php/course/forum/topics', - ], - [ - 'step' => 4, - 'title' => 'Alle Diskussionen', - 'tip' => 'Hier finden Sie eine Übersicht aller stattfindenden Diskussionen.', - 'orientation' => 'R', - 'css_selector' => '#nav_forum_discussions', - 'route' => 'dispatch.php/course/forum/topics', - ], - [ - 'step' => 5, - 'title' => 'Letzte Aktivität', - 'tip' => 'Die neuesten Beiträge finden Sie, indem Sie alle Diskussionen absteigend nach „Letzte Aktivität“ sortieren.', - 'orientation' => 'B', - 'css_selector' => '.sortdesc', - 'route' => 'dispatch.php/course/forum/discussions', - ], - [ - 'step' => 6, - 'title' => 'Abonnements', - 'tip' => 'Welche Themen und Beiträge verfolgen Sie?', - 'orientation' => 'R', - 'css_selector' => '#nav_forum_subscriptions', - 'route' => 'dispatch.php/course/forum/topics', - ], - [ - 'step' => 7, - 'title' => 'Kategorien', - 'tip' => 'Sie fassen mehrere Themen zusammen und sind optional.', - 'orientation' => 'B', - 'css_selector' => '#nav_forum_categories', - 'route' => 'dispatch.php/course/forum/topics', - ], - [ - 'step' => 8, - 'title' => 'Tour & Hilfe', - 'tip' => 'Diese Tour und weitere Hilfeseiten finden Sie hier.', - 'orientation' => 'B', - 'css_selector' => '#helpbar_icon > svg:nth-child(1)', - 'route' => 'dispatch.php/course/forum/topics', - ], - [ - 'step' => 9, - 'title' => 'Auf in den Austausch!', - 'tip' => 'Worüber wollen Sie diskutieren?', - 'orientation' => 'B', - 'css_selector' => 'a.button--icon-label', - 'route' => 'dispatch.php/course/forum/topics', - ] - ]; - $stmt = DBManager::get()->prepare( - "INSERT IGNORE INTO `help_tour_steps` - VALUES - ( - :tour_id, - :step, - :title, - :tip, - :orientation, - :interactive, - :css_selector, - :route, - :action_prev, - :action_next, - :author_email, - :mkdate, - :chdate - )" - ); - $meta = [ - 'tour_id' => 'ea68d2f9d7b81d01d2d3ea38a105c734', - 'interactive' => 0, - 'action_prev' => '', - 'action_next' => '', - 'author_email' => '', - 'mkdate' => time(), - 'chdate' => time() - ]; - foreach ($steps as $step) { - $stmt->execute(array_merge($meta, $step)); - } - } - - public function down() - { - $tour = ['tour_id' => 'ea68d2f9d7b81d01d2d3ea38a105c734']; - DBManager::get()->execute("DELETE FROM `help_tours` WHERE `tour_id` = :tour_id", $tour); - DBManager::get()->execute("DELETE FROM `help_tour_steps` WHERE `tour_id` = :tour_id", $tour); - DBManager::get()->execute("DELETE FROM `help_tour_settings` WHERE `tour_id` = :tour_id", $tour); - } - -} diff --git a/db/migrations/6.2.5_step_4756.php b/db/migrations/6.2.5_step_4756.php new file mode 100644 index 0000000..fa9abcb --- /dev/null +++ b/db/migrations/6.2.5_step_4756.php @@ -0,0 +1,53 @@ +exec("CREATE TABLE IF NOT EXISTS `masswidget` ( + `id` INT NOT NULL AUTO_INCREMENT, + `name` VARCHAR(255) NOT NULL, + `author_id` CHAR(32) COLLATE latin1_bin NOT NULL, + `target` ENUM('all', 'students', 'employees', 'lecturers', 'courses', 'usernames') COLLATE latin1_bin, + `settings` LONGTEXT, + `exclude_users` LONGTEXT, + `plugin_id` INT UNSIGNED NOT NULL, + `row` TINYINT UNSIGNED DEFAULT 0, + `col` TINYINT UNSIGNED DEFAULT 0, + `mkdate` INT UNSIGNED NOT NULL, + `chdate` INT UNSIGNED NOT NULL, + PRIMARY KEY (`id`), + INDEX author_id (`author_id`) + )"); + + DBManager::get()->exec("CREATE TABLE IF NOT EXISTS `masswidget_filter` ( + `masswidget_id` INT NOT NULL, + `filter_id` CHAR(32) COLLATE latin1_bin NOT NULL, + `mkdate` INT UNSIGNED NOT NULL, + PRIMARY KEY (`masswidget_id`, `filter_id`), + INDEX filter_id (`filter_id`) + )"); + + DBManager::get()->exec("ALTER TABLE `widget_user` + ADD COLUMN `is_active` TINYINT(1) UNSIGNED DEFAULT 1, + ADD COLUMN `chdate` INT UNSIGNED NOT NULL"); + } + + protected function down() + { + DBManager::get()->exec(" + DROP TABLE IF EXISTS + `masswidget_filter`, + `masswidget` + "); + + DBManager::get()->exec("ALTER TABLE `widget_user` + DROP COLUMN `is_active`, + DROP COLUMN `chdate`"); + } +}; -- cgit v1.0