diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/id_map/Sql.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/id_map/Sql.php
index 7f9cf0e..7df31b8 100644
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/id_map/Sql.php
+++ b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/id_map/Sql.php
@@ -258,7 +258,7 @@ protected function ensureTables() {
         );
         $fields['hash'] = array(
           'type' => 'varchar',
-          'length' => '32',
+          'length' => '64',
           'not null' => FALSE,
           'description' => 'Hash of source row data, for detecting changes',
         );
@@ -318,7 +318,7 @@ protected function ensureTables() {
         if (!$this->getDatabase()->schema()->fieldExists($this->mapTableName, 'hash')) {
           $this->getDatabase()->schema()->addField($this->mapTableName, 'hash', array(
             'type' => 'varchar',
-            'length' => '32',
+            'length' => '64',
             'not null' => FALSE,
             'description' => 'Hash of source row data, for detecting changes',
           ));
diff --git a/core/modules/migrate/tests/Drupal/migrate/Tests/MigrateSqlIdMapEnsureTablesTest.php b/core/modules/migrate/tests/Drupal/migrate/Tests/MigrateSqlIdMapEnsureTablesTest.php
index 28393fe..d63caa4 100644
--- a/core/modules/migrate/tests/Drupal/migrate/Tests/MigrateSqlIdMapEnsureTablesTest.php
+++ b/core/modules/migrate/tests/Drupal/migrate/Tests/MigrateSqlIdMapEnsureTablesTest.php
@@ -84,7 +84,7 @@ public function testEnsureTablesNotExist() {
     );
     $fields['hash'] = array(
       'type' => 'varchar',
-      'length' => '32',
+      'length' => '64',
       'not null' => FALSE,
       'description' => 'Hash of source row data, for detecting changes',
     );
@@ -172,7 +172,7 @@ public function testEnsureTablesExist() {
       ->will($this->returnValue(FALSE));
     $field_schema = array(
       'type' => 'varchar',
-      'length' => '32',
+      'length' => '64',
       'not null' => FALSE,
       'description' => 'Hash of source row data, for detecting changes',
     );
diff --git a/core/modules/migrate/tests/Drupal/migrate/Tests/RowTest.php b/core/modules/migrate/tests/Drupal/migrate/Tests/RowTest.php
index 2baf52a..b337cdf 100644
--- a/core/modules/migrate/tests/Drupal/migrate/Tests/RowTest.php
+++ b/core/modules/migrate/tests/Drupal/migrate/Tests/RowTest.php
@@ -156,6 +156,11 @@ public function testHashing() {
     $row->setSourceProperty('title', 'new title');
     $row->rehash();
     $this->assertSame($this->testHashMod, $row->getHash(), 'Hash changed correctly.');
+    // Check hash calculation algorithm.
+    $hash = hash('sha256', serialize($row->getSource()));
+    $this->assertSame($hash, $row->getHash());
+    // Check length of generated hash used for mapping schema.
+    $this->assertSame(64, strlen($row->getHash()));
 
     // Set the map to successfully imported.
     $test_id_map = array(
