mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-17 12:22:42 +01:00
Fix Herald repetition policy migration for NULL
When we change a nullable column to a non-nullable column, we can get a data truncation error if any value was "NULL". This is exceptionally unusual, but our two very oldest Herald rules have a "NULL" policy on `secure`.
This commit is contained in:
parent
9d69118664
commit
fd49acd033
1 changed files with 4 additions and 0 deletions
|
@ -5,6 +5,10 @@
|
|||
|
||||
*/
|
||||
|
||||
UPDATE {$NAMESPACE}_herald.herald_rule
|
||||
SET repetitionPolicy = '1'
|
||||
WHERE repetitionPolicy IS NULL;
|
||||
|
||||
ALTER TABLE {$NAMESPACE}_herald.herald_rule
|
||||
CHANGE repetitionPolicy
|
||||
repetitionPolicy VARCHAR(32) NOT NULL COLLATE {$COLLATE_TEXT};
|
||||
|
|
Loading…
Reference in a new issue