mysql - How do I make 2 columns unique together? -
i have 2 columns:
- confirmed_email
- unconfirmed_email
i don't want them overlap. want:
- confirmed_email unique
- unconfirmed_email unique
- confirmed_email + unconfirmed_email unique, if merged together. if "hello@gmail.com" exists in confirmed_email ,then cannot updated unconfirmed_email.
is there setting this?
i doubt want store 2 emails.
use 1 field , add bool field stores whether email confirmed.
Comments
Post a Comment