From 8d3dd883b3b663469f8eac59e7f91288cc751922 Mon Sep 17 00:00:00 2001 From: Erik Huelsmann Date: Sun, 28 May 2023 13:06:39 +0200 Subject: [PATCH] Fix regression while renaming setting with typo --- sql/changes/1.9/fix-template-images-typo.sql | 6 ++++++ sql/changes/1.9/fix-template-images-typo.sql@1 | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 sql/changes/1.9/fix-template-images-typo.sql@1 diff --git a/sql/changes/1.9/fix-template-images-typo.sql b/sql/changes/1.9/fix-template-images-typo.sql index 4e41037589..2c8b2c3e3d 100644 --- a/sql/changes/1.9/fix-template-images-typo.sql +++ b/sql/changes/1.9/fix-template-images-typo.sql @@ -1,4 +1,10 @@ +-- if both keys exist, remove the one with the typo +DELETE FROM defaults + WHERE setting_key = 'template_immages' + AND EXISTS (select from defaults + where setting_key = 'template_images'); + UPDATE defaults SET setting_key = 'template_images' WHERE setting_key = 'template_immages'; diff --git a/sql/changes/1.9/fix-template-images-typo.sql@1 b/sql/changes/1.9/fix-template-images-typo.sql@1 new file mode 100644 index 0000000000..4e41037589 --- /dev/null +++ b/sql/changes/1.9/fix-template-images-typo.sql@1 @@ -0,0 +1,5 @@ + +UPDATE defaults + SET setting_key = 'template_images' + WHERE setting_key = 'template_immages'; +