Uniqueness and sql serialize

They are, but that doesn’t prevent races like the one in the documentation from occurring - in that case, both transactions find no conflicting records and create a row.

As noted in the docs, if you really really need data consistency you’re better off using a unique index and catching ActiveRecord::RecordNotUnique.

–Matt Jones