Last Updated: February 25, 2016
·
634
· rshetty

Make Your Database Field CaseSensitive

By Default the database fields you use are case insensitive. To modify your field to make it case sensitive. Create a migration and add this line to it.

execute("ALTER TABLE users MODIFY `name` varchar(255) CHARACTER SET utf8 COLLATE    utf8_bin NOT NULL;")

In the above snippet, we are making the database field case sensitive by changing the datatype of the field from a "varchar" to utf8 COLLATE.