sql: Add migration for bad message-id data in the database

This commit is contained in:
Michael Gratton 2020-08-13 15:50:07 +10:00
parent d280bcbbeb
commit 33801f22ef
2 changed files with 8 additions and 1 deletions

7
sql/version-027.sql Normal file
View file

@ -0,0 +1,7 @@
--
-- Rebuild corrupted message ids.
--
UPDATE MessageTable
SET message_id = '<' || message_id || '>'
WHERE (message_id NOT LIKE '<%') AND (message_id NOT LIKE ' <%');