diff --git a/core/modules/file/file.install b/core/modules/file/file.install index 2db5c47..74b4a8c 100644 --- a/core/modules/file/file.install +++ b/core/modules/file/file.install @@ -297,7 +297,7 @@ function file_update_8003() { $spec = array( 'description' => 'The name of the module that is using the file.', 'type' => 'varchar', - 'length' => SYSTEM_UPDATE_8056_NAME_MAX_LENGTH, + 'length' => 50, 'not null' => TRUE, 'default' => '', ); diff --git a/core/modules/node/node.install b/core/modules/node/node.install index 9caf73e..5e1c95d 100644 --- a/core/modules/node/node.install +++ b/core/modules/node/node.install @@ -320,7 +320,7 @@ function node_schema() { 'module' => array( 'description' => 'The module defining this node type.', 'type' => 'varchar', - 'length' => SYSTEM_UPDATE_8056_NAME_MAX_LENGTH, + 'length' => DRUPAL_EXTENSION_NAME_MAX_LENGTH, 'not null' => TRUE, ), 'description' => array( @@ -759,7 +759,7 @@ function node_update_8016() { $spec = array( 'description' => 'The module defining this node type.', 'type' => 'varchar', - 'length' => SYSTEM_UPDATE_8056_NAME_MAX_LENGTH, + 'length' => 50, 'not null' => TRUE, ); db_change_field('node_type', 'module', 'module', $spec); diff --git a/core/modules/search/search.install b/core/modules/search/search.install index b4d879c..40a569c 100644 --- a/core/modules/search/search.install +++ b/core/modules/search/search.install @@ -28,7 +28,7 @@ function search_schema() { ), 'type' => array( 'type' => 'varchar', - 'length' => DRUPAL_EXTENSION_NAME_MAX_LENGTH, + 'length' => 16, 'not null' => TRUE, 'description' => 'Type of item, e.g. node.', ), @@ -75,7 +75,7 @@ function search_schema() { ), 'type' => array( 'type' => 'varchar', - 'length' => DRUPAL_EXTENSION_NAME_MAX_LENGTH, + 'length' => 16, 'not null' => TRUE, 'description' => 'The {search_dataset}.type of the searchable item to which the word belongs.', ), @@ -132,7 +132,7 @@ function search_schema() { ), 'type' => array( 'type' => 'varchar', - 'length' => DRUPAL_EXTENSION_NAME_MAX_LENGTH, + 'length' => 16, 'not null' => TRUE, 'default' => '', 'description' => 'The {search_dataset}.type of the searchable item containing the link to the node.', diff --git a/core/modules/system/lib/Drupal/system/Tests/Module/ModuleEnable.php b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleEnable.php index 97b4d03..c462d24 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Module/ModuleEnable.php +++ b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleEnable.php @@ -8,6 +8,7 @@ namespace Drupal\system\Tests\Module; use Drupal\simpletest\WebTestBase; +use Drupal\Core\Extension\ExtensionNameMaxLength; /** * Tests module_enable(). diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 39931df..8399769 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -1230,13 +1230,6 @@ function system_update_last_removed() { */ /** - * The maximum number of characters in a module name for system_update_8056(). - * - * @see DRUPAL_EXTENSION_NAME_MAX_LENGTH - */ -const SYSTEM_UPDATE_8056_NAME_MAX_LENGTH = 50; - -/** * Move from the Garland theme. */ function system_update_8001() { @@ -2150,13 +2143,15 @@ function system_update_8055() { /** * Change the length of the 'module' column to the maximum length. + * + * @see system_update_8048() */ function system_update_8056() { if (db_field_exists('menu_links', 'module')) { $spec = array( 'description' => 'The name of the module that generated this link.', 'type' => 'varchar', - 'length' => SYSTEM_UPDATE_8056_NAME_MAX_LENGTH, + 'length' => 50, 'not null' => TRUE, 'default' => 'system', ); diff --git a/core/modules/user/user.install b/core/modules/user/user.install index 4513e34..8c15e09 100644 --- a/core/modules/user/user.install +++ b/core/modules/user/user.install @@ -1057,7 +1057,7 @@ function user_update_8018() { if (db_field_exists('role_permission', 'module')) { $spec = array( 'type' => 'varchar', - 'length' => SYSTEM_UPDATE_8056_NAME_MAX_LENGTH, + 'length' => 50, 'not null' => TRUE, 'default' => '', 'description' => "The module declaring the permission.", @@ -1069,7 +1069,7 @@ function user_update_8018() { $spec = array( 'description' => 'The name of the module declaring the variable.', 'type' => 'varchar', - 'length' => SYSTEM_UPDATE_8056_NAME_MAX_LENGTH, + 'length' => 50, 'not null' => TRUE, 'default' => '', ); @@ -1079,7 +1079,7 @@ function user_update_8018() { if (db_field_exists('users', 'theme')) { $spec = array( 'type' => 'varchar', - 'length' => SYSTEM_UPDATE_8056_NAME_MAX_LENGTH, + 'length' => 50, 'not null' => TRUE, 'default' => '', 'description' => "User's default theme.",