diff --git a/core/modules/block/custom_block/custom_block.install b/core/modules/block/custom_block/custom_block.install
index 3474559..97be8b3 100644
--- a/core/modules/block/custom_block/custom_block.install
+++ b/core/modules/block/custom_block/custom_block.install
@@ -44,7 +44,7 @@ function custom_block_schema() {
       'type' => array(
         'description' => 'The type of this custom block.',
         'type' => 'varchar',
-        'length' => 32,
+        'length' => 50,
         'not null' => TRUE,
         'default' => '',
       ),
@@ -64,7 +64,7 @@ function custom_block_schema() {
     ),
     'primary key' => array('id'),
     'indexes' => array(
-      'block_custom_type'   => array(array('type', 4)),
+      'block_custom_type' => array('type'),
     ),
     'unique keys' => array(
       'revision_id' => array('revision_id'),
@@ -161,7 +161,7 @@ function custom_block_schema_0() {
       'type' => array(
         'description' => 'The type of this custom block.',
         'type' => 'varchar',
-        'length' => 32,
+        'length' => 50,
         'not null' => TRUE,
         'default' => '',
       ),
@@ -181,7 +181,7 @@ function custom_block_schema_0() {
     ),
     'primary key' => array('id'),
     'indexes' => array(
-      'block_custom_type'   => array(array('type', 4)),
+      'block_custom_type' => array('type'),
     ),
     'unique keys' => array(
       'revision_id' => array('revision_id'),
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php
index ea20a79..e2f39b0 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php
@@ -181,7 +181,8 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
     $fields['type'] = FieldDefinition::create('entity_reference')
       ->setLabel(t('Block type'))
       ->setDescription(t('The block type.'))
-      ->setSetting('target_type', 'custom_block_type');
+      ->setSetting('target_type', 'custom_block_type')
+      ->setSetting('max_length', 32);
 
     $fields['log'] = FieldDefinition::create('string')
       ->setLabel(t('Revision log message'))
diff --git a/core/modules/comment/comment.install b/core/modules/comment/comment.install
index de9c0c8..0cdb52a 100644
--- a/core/modules/comment/comment.install
+++ b/core/modules/comment/comment.install
@@ -64,7 +64,7 @@ function comment_schema() {
         'type' => 'varchar',
         'not null' => TRUE,
         'default' => 'node',
-        'length' => 255,
+        'length' => 32,
         'description' => 'The entity_type of the entity to which this comment is a reply.',
       ),
       'field_id' => array(
@@ -193,7 +193,7 @@ function comment_schema() {
         'type' => 'varchar',
         'not null' => TRUE,
         'default' => 'node',
-        'length' => 255,
+        'length' => 32,
         'description' => 'The entity_type of the entity to which this comment is a reply.',
       ),
       'field_id' => array(
diff --git a/core/modules/content_translation/content_translation.install b/core/modules/content_translation/content_translation.install
index e474d69..2d6558e 100644
--- a/core/modules/content_translation/content_translation.install
+++ b/core/modules/content_translation/content_translation.install
@@ -17,7 +17,7 @@ function content_translation_schema() {
     'fields' => array(
       'entity_type' => array(
         'type' => 'varchar',
-        'length' => 128,
+        'length' => 32,
         'not null' => TRUE,
         'default' => '',
         'description' => 'The entity type this translation relates to',
diff --git a/core/modules/node/lib/Drupal/node/Entity/Node.php b/core/modules/node/lib/Drupal/node/Entity/Node.php
index bac1cb0..6a32874 100644
--- a/core/modules/node/lib/Drupal/node/Entity/Node.php
+++ b/core/modules/node/lib/Drupal/node/Entity/Node.php
@@ -351,6 +351,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
       ->setLabel(t('Type'))
       ->setDescription(t('The node type.'))
       ->setSetting('target_type', 'node_type')
+      ->setSetting('max_length', 32)
       ->setReadOnly(TRUE);
 
     $fields['langcode'] = FieldDefinition::create('language')
diff --git a/core/modules/node/node.install b/core/modules/node/node.install
index a6af612..ffc5ebe 100644
--- a/core/modules/node/node.install
+++ b/core/modules/node/node.install
@@ -72,7 +72,7 @@ function node_schema() {
       ),
     ),
     'indexes' => array(
-      'node_type' => array(array('type', 4)),
+      'node_type' => array('type'),
     ),
     'unique keys' => array(
       'vid' => array('vid'),
@@ -236,7 +236,7 @@ function node_schema() {
       'node_frontpage' => array('promote', 'status', 'sticky', 'created'),
       'node_status_type' => array('status', 'type', 'nid'),
       'node_title_type' => array('title', array('type', 4)),
-      'node_type' => array(array('type', 4)),
+      'node_type' => array('type'),
       'vid' => array('vid'),
       'uid' => array('uid'),
     ),
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php
index 38c84e1..a028c36 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php
@@ -121,7 +121,8 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
     $fields['vid'] = FieldDefinition::create('entity_reference')
       ->setLabel(t('Vocabulary'))
       ->setDescription(t('The vocabulary to which the term is assigned.'))
-      ->setSetting('target_type', 'taxonomy_vocabulary');
+      ->setSetting('target_type', 'taxonomy_vocabulary')
+      ->setSetting('max_length', 32);
 
     $fields['langcode'] = FieldDefinition::create('language')
       ->setLabel(t('Language code'))
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php
index b624351..31b95e2 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php
@@ -37,7 +37,7 @@ public function form(array $form, array &$form_state) {
     $form['vid'] = array(
       '#type' => 'machine_name',
       '#default_value' => $vocabulary->id(),
-      '#maxlength' => 255,
+      '#maxlength' => 32,
       '#machine_name' => array(
         'exists' => 'taxonomy_vocabulary_load',
         'source' => array('name'),
diff --git a/core/modules/taxonomy/taxonomy.install b/core/modules/taxonomy/taxonomy.install
index f76d350..c6200e8a 100644
--- a/core/modules/taxonomy/taxonomy.install
+++ b/core/modules/taxonomy/taxonomy.install
@@ -26,7 +26,7 @@ function taxonomy_schema() {
       ),
       'vid' => array(
         'type' => 'varchar',
-        'length' => 255,
+        'length' => 32,
         'not null' => TRUE,
         'default' => '',
         'description' => 'The ID of the vocabulary to which the term is assigned.',
@@ -75,8 +75,8 @@ function taxonomy_schema() {
       'uuid' => array('uuid'),
     ),
     'indexes' => array(
-      'taxonomy_tree' => array(array('vid', 64), 'weight', 'name'),
-      'vid_name' => array(array('vid', 64), 'name'),
+      'taxonomy_tree' => array('vid', 'weight', 'name'),
+      'vid_name' => array('vid', 'name'),
       'name' => array('name'),
     ),
   );
