hook_schema duplicate unique keys
A field that is not defined as unique key or primary key is allowed to have the same value in different records of that database table. So, if you don't want to have the same value of aid in two different records, you need to define it as unique key, if it is not already the primary key.

Notice that the line defining aid_vid as unique key would allow the following records.


aid  | vid  ! other_field
-------------------------
1      3      10
1      4      22
2      4      14


Only the line defining aid as unique key avoids two records have the same value for the aid field.