If you use Nicolas' dbadmin then the @:index metadata creates the necessary constraints on your MySQL tables.
If you have those constraints (you can also add them manually or with phpmyadmin also) then you get runtime errors you can catch if there are duplicate records
As a fallback, you can always use TableCreate to set up your tables, and a tool like phpmyadmin to add the constraints manually, though DBAdmin does detect changes to your models and offer to make those changes to the database, which is pretty handy.
@:index(field1,field2,...,[unique]): declare an index consisting of the specified classes fields - in that order. If the last field is
uniquethen it means that's an unique index (each combination of fields values can only occur once)