<http://stackoverflow.com/questions/32160819/is-it-possible-to-set-the-constraint-unique-true-except-for-empty-string-into#>
 

I use the following column in my table:


email = Column(String(60), unique=True)

However, I need the possibility to save empty strings in this column. 
Namely, I need something like this:


email = Column(String(60), unique=True, blank=True)


but it doesn't work. Is it possible to implement this within SQLAlchemy? 
What is correspondent SQL (Postgresql dialect)?

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to