guestbook-ng/migrations/5/up.sql
2022-01-02 01:31:33 -05:00

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;