Skip to content

Commit

Permalink
fix: Fix migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
nt0xa committed Jul 3, 2020
1 parent faf3c93 commit 3889ea6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ALTER TABLE users ADD COLUMN is_admin BOOL NOT NULL DEFAULT false;

WITH admins AS (
SELECT * FROM users WHERE (params->'admin')::BOOL = true
SELECT * FROM users WHERE (params->>'admin')::BOOL = true
)
UPDATE users SET is_admin = true FROM admins WHERE users.id = admins.id;

Expand Down

0 comments on commit 3889ea6

Please sign in to comment.