Skip to content

Commit 3530771

Browse files
committed
prevent null email from being added to emails table
1 parent 5a3a2b1 commit 3530771

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)