Files
sorsfonalak/crates/db/migrations/0044_forum_founders.sql
T

6 lines
351 B
SQL
Raw Normal View History

-- "Alapító tag": the first hundred members (in the order they chose a
-- nickname) keep the badge for good, however many come after them.
ALTER TABLE forum.members ADD COLUMN founder boolean NOT NULL DEFAULT false;
UPDATE forum.members SET founder = true
WHERE user_id IN (SELECT user_id FROM forum.members ORDER BY created_at, user_id LIMIT 100);