How to assign uid in "users" table with imported users?
Inserting data directly into Drupal tables is generally a bad idea (until you are familiar enough with the database schema to know what you're doing). For programmatically inserting users there are functions like user_save() and drupal_form_submit() that you can use.

As for generating the unique uid: if you can't just provide incremental values in the data insertion loop then you might be able to use the following code instead (copied from user_save() function):

$account-&gt;uid = db_next_id(db_query('SELECT MAX(uid) FROM {users}')-&gt;fetchField());


I'm not familiar with the Migrate module so I don't have more specific advice to offer currently, but the above info and links should be helpful.