I am not entirely sure if this is a bug or a documentation issue.

I created a class that imports a CSV file of users. This is the relevant MigrateSQLMap section of code:

$this->map = new MigrateSQLMap($this->machineName,
        array('MA_ID' => array( // this field is used to connect user und profile2 
                'type' => 'varchar',
                'length' => 32,//6
                'not null' => TRUE,//was TRUE
                'description' => t('User\'s Member-ID') // description never used
              )

I had originally had length set to 6, but later discovered that column in the CSV file can be up to 32. So I adjusted the class, and re-did the import, and kept getting "data was too long for column" errors. I then checked the database and saw that sourceid1 was still set to 6, and not the updated value of 32.

Comments

stevenpatz’s picture

Status: Active » Closed (duplicate)

Found an already open issue. Marking this a duplicate.
#1175304: warn if map/message tables are out of sync with key schema