diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
index 6ce4a0a..2194357 100644
--- a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
+++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
@@ -513,21 +513,21 @@ class Schema extends DatabaseSchema {
 
     $spec = $this->processField($spec);
 
-    // We need to typecast the new column to best be able to transfer the data
-    // Schema_pgsql::getFieldTypeMap() will return possibilities that are not
-    // 'cast-able' such as 'serial' - so they need to be casted int instead.
-    if (in_array($spec['pgsql_type'], array('serial', 'bigserial', 'numeric'))) {
-      $typecast = 'int';
+    // Type 'serial' is known to PostgreSQL, but only during table creation,
+    // not when altering. Because of that, we create it here as an 'int'. After
+    // we create it we manually re-apply the sequence.
+    if (in_array($spec['pgsql_type'], array('serial', 'bigserial'))) {
+      $field_def = 'int';
     }
     else {
-      $typecast = $spec['pgsql_type'];
+      $field_def = $spec['pgsql_type'];
     }
 
     if (in_array($spec['pgsql_type'], array('varchar', 'character', 'text')) && isset($spec['length'])) {
-      $typecast .= '(' . $spec['length'] . ')';
+      $field_def .= '(' . $spec['length'] . ')';
     }
     elseif (isset($spec['precision']) && isset($spec['scale'])) {
-      $typecast .= '(' . $spec['precision'] . ', ' . $spec['scale'] . ')';
+      $field_def .= '(' . $spec['precision'] . ', ' . $spec['scale'] . ')';
     }
 
     // Remove old check constraints.
@@ -540,7 +540,7 @@ class Schema extends DatabaseSchema {
     // Remove old default.
     $this->fieldSetNoDefault($table, $field);
 
-    $this->connection->query('ALTER TABLE {' . $table . '} ALTER "' . $field . '" TYPE ' . $typecast . ' USING "' . $field . '"::' . $typecast);
+    $this->connection->query('ALTER TABLE {' . $table . '} ALTER "' . $field . '" TYPE ' . $field_def . ' USING "' . $field . '"::' . $field_def);
 
     if (isset($spec['not null'])) {
       if ($spec['not null']) {
@@ -553,7 +553,7 @@ class Schema extends DatabaseSchema {
     }
 
     if (in_array($spec['pgsql_type'], array('serial', 'bigserial'))) {
-      // Type "serial" is known to PostgreSQL, but *only* during table creation,
+      // Type 'serial' is known to PostgreSQL, but only during table creation,
       // not when altering. Because of that, the sequence needs to be created
       // and initialized by hand.
       $seq = "{" . $table . "}_" . $field_new . "_seq";
