Unable to migrate users I have been using the migrate module to migrate users from Drupal 7.59 to Drupal 7.59. I encounter the following error.

Migration for &lt;em class="placeholder"&gt;NonDomainUserMigration&lt;/em&gt; failed with source plugin exception: &lt;em class="placeholder"&gt;SQLSTATE[42S22]: Column not found: 1054     [error]
Unknown column &amp;#039;pgid&amp;#039; in &amp;#039;on clause&amp;#039;&lt;/em&gt;, in &lt;em class="placeholder"&gt;/app/includes/database/database.inc&lt;/em&gt;:&lt;em class="placeholder"&gt;2227&lt;/em&gt;


What could be the issue? I can't find any pgid column in the drupal database.

the following is my User migration code

&lt;?php
abstract class NonDomainBaseMigration extends Migration {

  // A Migration constructor takes an array of arguments as its first parameter.
  // The arguments must be passed through to the parent constructor.
  public function __construct($arguments) {
    parent::__construct($arguments);

    // With migrate_ui enabled, migration pages will indicate people involved in
    // the particular migration, with their role and contact info. We default the
    // list in the shared class; it can be overridden for specific migrations.
    $this-&gt;team = array(
      new MigrateTeamMember('Moses Liao', 'moseslgz@sph.com.sg',
        t('Tech Lead')),
    );

    Database::addConnectionInfo('legacy', 'default', array(
      'driver' =&gt; 'mysql',
      'database' =&gt; 'zaobao_drupal',
      'username' =&gt; 'root',
      'password' =&gt; 'password',
      'host' =&gt; 'mysqldb',
      'prefix' =&gt; '',
    ));
  }
}

class NonDomainUserMigration extends NonDomainBaseMigration {
  public function __construct($arguments) {

    parent::__construct($arguments);
    $this-&gt;description = t('Legacy Zaobao Drupal 7 system Users');

    $query = Database::getConnection('default', 'legacy')
    -&gt;select('users', 'u')
    -&gt;fields('u');

    $this-&gt;source = new MigrateSourceSQL($query);
    $this-&gt;destination = new MigrateDestinationUser();

    $source_key = array(
      'pgid' =&gt; array('type' =&gt; 'int',
                      'unsigned' =&gt; TRUE,
                      'not null' =&gt; TRUE,
                      'description' =&gt; t('Source ID'),
                     )
    );
    $this-&gt;map = new MigrateSQLMap($this-&gt;machineName, $source_key,
      MigrateDestinationNode::getKeySchema(), 'legacy', array('track_last_imported' =&gt; TRUE));

    $this-&gt;addSimpleMappings(
      array(
        'uid',
        'name',
        'pass',
        'mail',
        'theme',
        'signature',
        'signature_format',
        'created',
        'access',
        'login',
        'status',
        'timezone',
        'language',
        'picture',
        'init',
        'data',
      )
    );
  }
}
its seems to me that pgid is wrong. Should be uid for users