From 4627ad6b806eaa49832784c52a33ba93001437df Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms Date: Tue, 10 Mar 2026 12:29:54 +0100 Subject: add migration that fixes the pk for table files_search_index, fixes #6184 Closes #6184 Merge request studip/studip!4691 --- db/migrations/5.4.23_fix_files_search_index_pk.php | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 db/migrations/5.4.23_fix_files_search_index_pk.php diff --git a/db/migrations/5.4.23_fix_files_search_index_pk.php b/db/migrations/5.4.23_fix_files_search_index_pk.php new file mode 100644 index 0000000..874e245 --- /dev/null +++ b/db/migrations/5.4.23_fix_files_search_index_pk.php @@ -0,0 +1,30 @@ +columnExists('files_search_index', 'FTS_DOC_ID')) { + DBManager::get()->exec( + "ALTER TABLE `files_search_index` + DROP COLUMN `FTS_DOC_ID`, + ADD COLUMN `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST" + ); + } else { + DBManager::get()->exec( + "ALTER TABLE `files_search_index` + ADD COLUMN `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST" + ); + } + + } +} -- cgit v1.0