A platform for community discussion. Free, open, simple.
FIX: Handle empty string in theme_settings for upload_references (#17047)
Martin Brennan20f118c4c9da
diff --git a/db/migrate/20220404212716_copy_theme_settings_uploads_to_upload_references.rb b/db/migrate/20220404212716_copy_theme_settings_uploads_to_upload_references.rbindex 8d3cefe6982..79c1a39c2ff 100644--- a/db/migrate/20220404212716_copy_theme_settings_uploads_to_upload_references.rb+++ b/db/migrate/20220404212716_copy_theme_settings_uploads_to_upload_references.rb@@ -7,7 +7,7 @@ class CopyThemeSettingsUploadsToUploadReferences < ActiveRecord::Migration[6.1]SELECT theme_settings.value::int, 'ThemeSetting', theme_settings.id, uploads.created_at, uploads.updated_atFROM theme_settingsJOIN uploads ON uploads.id = theme_settings.value::int- WHERE data_type = 6 AND theme_settings.value IS NOT NULL+ WHERE data_type = 6 AND theme_settings.value IS NOT NULL AND theme_settings.value != ''ON CONFLICT DO NOTHINGSQLend