From 6e1dcaa6d7572da73ac16c325221704672264bc8 Mon Sep 17 00:00:00 2001 From: Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> Date: Mon, 30 Oct 2023 14:58:18 +0000 Subject: [PATCH] handle migration possibly running twice, fixes #3407 Closes #3407 Merge request studip/studip!2316 --- db/migrations/5.1.52_fix_for_biest3366.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/migrations/5.1.52_fix_for_biest3366.php b/db/migrations/5.1.52_fix_for_biest3366.php index 2ff333b6609..c889844f171 100644 --- a/db/migrations/5.1.52_fix_for_biest3366.php +++ b/db/migrations/5.1.52_fix_for_biest3366.php @@ -9,12 +9,12 @@ class FixForBiest3366 extends Migration public function up() { - DBManager::get()->exec('DROP TABLE `globalsearch_buzzwords`'); + DBManager::get()->exec('DROP TABLE IF EXISTS `globalsearch_buzzwords`'); } public function down() { - DBManager::get()->exec("CREATE TABLE `globalsearch_buzzwords` ( + DBManager::get()->exec("CREATE TABLE IF NOT EXISTS `globalsearch_buzzwords` ( `id` CHAR(32) COLLATE latin1_bin NOT NULL, `rights` ENUM('user','autor','tutor','dozent','admin','root') NOT NULL DEFAULT 'user', `name` varchar(255) NOT NULL DEFAULT '', -- GitLab