I need to store negative values in bigint field, but when try to fill it - got the error The integer must be larger or equal to 0.
In field settings minimum and maximum values are empty. Even when I fill minimum value in field settings to -10000000000000000, I got the same error.

Comments

Murz created an issue. See original summary.

murz’s picture

Seems field us hardcoded to be always unsigned?

  public static function defaultStorageSettings() {
    return [
        'unsigned' => TRUE,
        'size' => 'big',
      ] + parent::defaultStorageSettings();
  }

ANd I can't find where to change field type from unsigned to unsigned in Drupal field settings interface.

murz’s picture

Simply changing

        'unsigned' => TRUE,

to

        'unsigned' => FALSE,

and recreating field helps solve the problem. Can you expand this setting to Drupal field settings form?

sergiu stici’s picture

StatusFileSize
new1.12 KB

You can change this option in field setting.

sergiu stici’s picture

Status: Active » Needs review
murz’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, patch works well!

m4olivei’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.54 KB
new1.34 KB

The patch works great, also a +1 for me. I just wanted to tweak the language a bit and fix some coding standards. Patch attached.

alansaviolobo’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.