Postponed
Project:
Drupal core
Version:
main
Component:
number.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Mar 2012 at 13:44 UTC
Updated:
16 Aug 2023 at 15:20 UTC
Jump to comment: Most recent
Comments
Comment #1
j2r commentedDrupal schema api does not allow to enter length with the int type.
Comment #2
j2r commentedComment #3
j2r commentedI have solved this issue but for that i had make changes in the Schema.php
protected function createFieldSql($name, $spec) {
$sql = "`" . $name . "` " . $spec['mysql_type'];
if (in_array($spec['mysql_type'], array('VARCHAR', 'CHAR', 'TINYTEXT', 'MEDIUMTEXT', 'LONGTEXT', 'TEXT', 'INT')) && isset($spec['length'])) {
$sql .= '(' . $spec['length'] . ')';
}
Added 'INT' in above function.
Is there a specific reason why the 'INT' is not added in specifying the length of the field.
If its not an issue to add INT in above code then i will upload the patch.
Comment #4
swentel commentedThis is D9 material
Comment #5
catchContrib can add new field types, so not sure why this would be major.
Comment #6
catchComment #22
rodrigoaguileraI just published a new version (1.3.1) of a module that adds this functionality using the third party settings of a widget.
https://www.drupal.org/project/change_labels