FIX: Fix verification_status migration for uploads

FIX: Fix verification_status migration for uploads

  • Missing ELSE 1 even though there is a default on the column.
diff --git a/db/migrate/20200910051633_change_uploads_verified_to_integer.rb b/db/migrate/20200910051633_change_uploads_verified_to_integer.rb
index 67ef689..785817b 100644
--- a/db/migrate/20200910051633_change_uploads_verified_to_integer.rb
+++ b/db/migrate/20200910051633_change_uploads_verified_to_integer.rb
@@ -10,6 +10,7 @@ class ChangeUploadsVerifiedToInteger < ActiveRecord::Migration[6.0]
       UPDATE uploads SET verification_status = CASE WHEN
         verified THEN 2
         WHEN NOT verified THEN 3
+        ELSE 1
         END
       SQL
     )

GitHub sha: c2a660ea

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/pg-error-null-value-in-column-verification-status-violates-not-null-constraint/164303/2