I have a unique index like so in my migration
add_index :table, :name, unique: true
Now the unique constraint allows for multiple nil
values however I also want blank values (empty strings ""
) to bypass unique constraint as well. What is the best way to keep the unique index but also bypass and allow multiple blank strings?