aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--db/schema_0004-create_users_from_comments_and_link.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/schema_0004-create_users_from_comments_and_link.sql b/db/schema_0004-create_users_from_comments_and_link.sql
index 6dc50f531..0e4e2b5f2 100644
--- a/db/schema_0004-create_users_from_comments_and_link.sql
+++ b/db/schema_0004-create_users_from_comments_and_link.sql
@@ -32,10 +32,10 @@ WHERE users.name = '';
ALTER table comment
ADD COLUMN anonymous BOOL;
-UPDATE comment SET anonymous = true WHERE name = '';
-
UPDATE comment SET anonymous = false WHERE name <> '';
+UPDATE comment SET anonymous = true WHERE anonymous is NULL;
+
-- tidy up now everythings in place
ALTER table comment
ALTER COLUMN user_id SET NOT NULL;