Hi Folks,

I am using 7.41 and all modules are up to date.

I came across an interesting error when doing a feeds import using media and remote stream wrapper "SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'field_file_display' cannot be null".

So, I went poking around the db and found the culprit field and its description "Flag to control whether this file should be displayed when viewing content". So I went to file.install and found this interesting schema:

      'display' => array(
        'description' => 'Flag to control whether this file should be displayed when viewing content.',
        'type' => 'int',
        'size' => 'tiny',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 1,
      ),

So I am trying to understand why it is necessary to set not null as TRUE if default is being assigned a value?

Has this question been raised before? Can I provide a patch to set not null to FALSE?

Of course I am now going to the modules to raise the issue of providing a value to the display field, but I am curious if this should be patched here.

Thanks.

Comments

hkovacs created an issue. See original summary.

hkovacs’s picture

So it turns out the fix was in the dev version of media feeds https://www.drupal.org/node/1570848, but still wondering about the file display logic.

Version: 7.41 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.