Migration failed with source plugin exception I'm getting the following error:

Migration failed with source plugin exception Migration failed with source plugin exception: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'posmsoftllc' for column 'sourceid1' at row 1


I can't figure out why I'm getting this error.

It has something to do with my MigrateSQLMap - there's no real primary key on the source database, but I suppose username would probably work. I've got the MigrateSQLMap setup as follows:

$this-&gt;map = new MigrateSQLMap($this-&gt;machineName, array(
  'Username' =&gt; array('type' =&gt; 'varchar',
    'length' =&gt; 75,
    'unsigned' =&gt; FALSE,
    'not null' =&gt; FALSE,
  )
    ), MigrateDestinationEntityAPI::getKeySchema('commerce_line_item', 'recurring')
);


But I'm receiving this error - what could be causing this? Why is it expecting an integer value? Do I even need this map for a successful migration?
I find when I get these errors it is because initially I make an sqlmap using an integer key -- then see I don't have an integer key and try to change it. The migration still expects the initial configuration of an int key. You likely have to clear it out as seen in this issue comment.


  Everything looks OK to me. Is it possible that when you initially
  defined your migration, you had an integer key in the MigrateSQLMap
  call? Changing the key in the code will not automatically change the
  associated tables. What you can do is:
  
  
  Rollback the AttSubject migration, so the map and message tables are
  empty.
  Drop the migrate_map_attsubject and migrate_message_attsubject
  tables.
  Run "drush ms". This should call the ensureTables() method and
  recreate the map and message tables using your ca_varchar1 key schema.
  Check the structure of the map and message tables and make sure
  sourceid1 is a varchar in both.
  


Also see this issue which describes the same problem and solution with more examples/details.