diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/IntegerBigItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/IntegerBigItem.php deleted file mode 100644 index 670db2b..0000000 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/IntegerBigItem.php +++ /dev/null @@ -1,42 +0,0 @@ - array( - 'value' => array( - 'type' => 'int', - 'size' => 'big', - 'not null' => FALSE, - // Expose the 'unsigned' setting in the field item schema. - 'unsigned' => $field_definition->getSetting('unsigned'), - ), - ), - ); - } - -} diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/UriItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/UriItem.php index 5fbf81a..dbef995 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/UriItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/UriItem.php @@ -52,7 +52,7 @@ public static function schema(FieldStorageDefinitionInterface $field_definition) return array( 'columns' => array( 'value' => array( - 'type' => 'text', + 'type' => 'varchar', 'length' => (int) $field_definition->getSetting('max_length'), 'not null' => TRUE, ), diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php index 75c4dcc..4222152 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php @@ -153,7 +153,6 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { ->setLabel(t('URL')) ->setDescription(t('The fully-qualified URL of the feed.')) ->setRequired(TRUE) - ->setSetting('max_length', NULL) ->setDisplayOptions('form', array( 'type' => 'uri', 'weight' => -3, diff --git a/core/modules/file/lib/Drupal/file/Entity/File.php b/core/modules/file/lib/Drupal/file/Entity/File.php index df31513..0aea1ee 100644 --- a/core/modules/file/lib/Drupal/file/Entity/File.php +++ b/core/modules/file/lib/Drupal/file/Entity/File.php @@ -255,14 +255,17 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { ->setLabel(t('File MIME type')) ->setDescription(t("The file's MIME type.")); - $fields['filesize'] = FieldDefinition::create('integer_big') + $fields['filesize'] = FieldDefinition::create('integer') ->setLabel(t('File size')) ->setDescription(t('The size of the file in bytes.')) - ->setSetting('unsigned', TRUE); + ->setSettings(array( + 'unsigned' => TRUE, + 'size' => 'big', + )); $fields['status'] = FieldDefinition::create('boolean') ->setLabel(t('Status')) - ->setDescription(t('The status of the file, temporary (0) and permanent (1).')); + ->setDescription(t('The status of the file, temporary (FALSE) and permanent (TRUE).')); $fields['created'] = FieldDefinition::create('created') ->setLabel(t('Created')) diff --git a/core/modules/node/lib/Drupal/node/Entity/Node.php b/core/modules/node/lib/Drupal/node/Entity/Node.php index 4fec018..0f1ae83 100644 --- a/core/modules/node/lib/Drupal/node/Entity/Node.php +++ b/core/modules/node/lib/Drupal/node/Entity/Node.php @@ -356,7 +356,10 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { $fields['type'] = FieldDefinition::create('entity_reference') ->setLabel(t('Type')) ->setDescription(t('The node type.')) - ->setSetting('target_type', 'node_type') + ->setSettings(array( + 'target_type' => 'node_type', + 'max_length' => BUNDLE_MAX_LENGTH, + )) ->setReadOnly(TRUE); $fields['langcode'] = FieldDefinition::create('language') @@ -437,7 +440,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { ->setQueryable(FALSE) ->setRevisionable(TRUE); - $fields['log'] = FieldDefinition::create('string') + $fields['log'] = FieldDefinition::create('string_long') ->setLabel(t('Log')) ->setDescription(t('The log entry explaining the changes in this revision.')) ->setRevisionable(TRUE) diff --git a/core/modules/shortcut/src/Entity/Shortcut.php b/core/modules/shortcut/src/Entity/Shortcut.php index 25339e8..bcec5aa 100644 --- a/core/modules/shortcut/src/Entity/Shortcut.php +++ b/core/modules/shortcut/src/Entity/Shortcut.php @@ -167,7 +167,10 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { $fields['shortcut_set'] = FieldDefinition::create('entity_reference') ->setLabel(t('Shortcut set')) ->setDescription(t('The bundle of the shortcut.')) - ->setSetting('target_type', 'shortcut_set') + ->setSettings(array( + 'target_type' => 'shortcut_set', + 'max_length' => BUNDLE_MAX_LENGTH, + )) ->setRequired(TRUE); $fields['title'] = FieldDefinition::create('string')