guestbook-ng/migrations/5/up.sql

11 lines
172 B
SQL

ALTER TABLE messages
ADD is_spam BOOLEAN;
UPDATE messages
SET is_spam = FALSE
WHERE is_spam IS NULL;
ALTER TABLE messages
ALTER COLUMN is_spam
SET NOT NULL;