Skip to content

Commit 1ba4a40

Browse files
committed
prevent null email from being added to emails table
1 parent 9d4d5fd commit 1ba4a40

File tree

1 file changed

+1
-1
lines changed
  • migrations/20170804200817_add_email_table

1 file changed

+1
-1
lines changed

migrations/20170804200817_add_email_table/up.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ CREATE table tokens (
1414
);
1515

1616
INSERT INTO emails (user_id, email)
17-
SELECT id, email FROM users;
17+
SELECT id, email FROM users WHERE email IS NOT NULL;

0 commit comments

Comments
 (0)