Commit 50de1d6d authored by catch's avatar catch

Issue #2616282 by peter.walter, mikeryan, chx, alexpott: error creating...

Issue #2616282 by peter.walter, mikeryan, chx, alexpott: error creating migrate_map table with mysql 5.7.9
parent f8ef22c4
......@@ -44,10 +44,14 @@ public function prepareRow(Row $row);
public function __toString();
/**
* Get the source ids.
* Defines the source fields uniquely identifying a source row. None of these
* fields should contain a NULL value - if necessary, use prepareRow() or
* hook_migrate_prepare_row() to rewrite NULL values to appropriate empty
* values (such as '' or 0).
*
* @return array
* The source ids.
* Array keyed by source field name, with values being a schema array
* describing the field (such as ['type' => 'string]).
*/
public function getIds();
......
......@@ -287,6 +287,7 @@ protected function ensureTables() {
foreach ($this->migration->getSourcePlugin()->getIds() as $id_definition) {
$mapkey = 'sourceid' . $count++;
$source_id_schema[$mapkey] = $this->getFieldSchema($id_definition);
$source_id_schema[$mapkey]['not null'] = TRUE;
// With InnoDB, utf8mb4-based primary keys can't be over 191 characters.
// Use ASCII-based primary keys instead.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment