From 24056065ba27a8e0b4dcf09fb2547bbdf69f03ad Mon Sep 17 00:00:00 2001 From: ninjasoturi <52629375+Ninjasoturi@users.noreply.github.com> Date: Mon, 12 Feb 2024 22:05:37 +0200 Subject: [PATCH] Again I forgot if not exists --- sql/upgrade/5.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/upgrade/5.sql b/sql/upgrade/5.sql index 3aa0ab5a..ef26c0fb 100644 --- a/sql/upgrade/5.sql +++ b/sql/upgrade/5.sql @@ -7,12 +7,12 @@ ALTER TABLE `photo_cache` ADD COLUMN IF NOT EXISTS `end_time` DATETIME DEFAULT N ALTER TABLE `photo_cache` ADD COLUMN IF NOT EXISTS `start_time` DATETIME DEFAULT NULL AFTER `end_time`; ALTER TABLE `cleanup` ADD COLUMN IF NOT EXISTS `media_unique_id` varchar(45) DEFAULT NULL AFTER `date_of_posting`; -ALTER TABLE `cleanup` ADD COLUMN `thread_id` INT UNSIGNED NULL AFTER `message_id`; +ALTER TABLE `cleanup` ADD COLUMN IF NOT EXISTS `thread_id` INT UNSIGNED NULL AFTER `message_id`; CREATE UNIQUE INDEX IF NOT EXISTS `unique_chat_msg` ON `cleanup` (chat_id, message_id); -ALTER TABLE `overview` ADD COLUMN `thread_id` INT UNSIGNED NULL AFTER `message_id`; +ALTER TABLE `overview` ADD COLUMN IF NOT EXISTS `thread_id` INT UNSIGNED NULL AFTER `message_id`; -ALTER TABLE `trainerinfo` ADD COLUMN `thread_id` INT UNSIGNED NULL AFTER `message_id`; +ALTER TABLE `trainerinfo` ADD COLUMN IF NOT EXISTS `thread_id` INT UNSIGNED NULL AFTER `message_id`; ALTER TABLE `raids` CHANGE COLUMN IF EXISTS `level` `level` TINYINT UNSIGNED DEFAULT NULL; ALTER TABLE `raid_bosses` CHANGE COLUMN IF EXISTS `raid_level` `raid_level` TINYINT UNSIGNED DEFAULT NULL;