Schema errors can be viewed at admin/build/schema/compare.

Two errors are reported:
* pollfield_votes.field_name_delta is type int but its default 0 is PHP type string
* pollfield_votes.weight is type int but its default 0 is PHP type string

These are caused by the schema definition in pollfield.install

    'field_name_delta' => array(
        'description' => t('delta for fields'),
        'type' => 'int',
        'unsigned' => 1,
        'not null' => TRUE,
        'default' => '0',
      ),
    'weight' => array(
        'description' => t('weight for mulitchoice'),
        'type' => 'int',
        'unsigned' => 1,
        'not null' => TRUE,
        'default' => '0',
      ),

This can be fixed by changing the default definitions from '0' to 0.

Comments

manarth’s picture

Status: Active » Needs review
StatusFileSize
new726 bytes

Patch attached.

mario_prkos’s picture

Thanks for patch. I will put it in.

MaxF’s picture

Version: 6.x-1.11-beta1 » 6.x-1.12-beta1
StatusFileSize
new1.75 KB

I produced the same patch on 6.x-1.12-beta1, so no need to post it here, again.

But, there is another mismatch in schema (at least in ):
* content_type_insider_discussion.field_pollfield_question is type text and may not have a default value
* content_type_insider_discussion.field_pollfield_choice is type text and may not have a default value
* content_type_insider_discussion.field_pollfield_anonymous is type text and may not have a default value
* content_type_insider_discussion.field_pollfield_poll_features is type text and may not have a default value

This warning can be patched as attached. You'll probably want to touch and save the corresponding content-type's pollfield to update schema definitions.
In this example, the content-type is 'type_insider_discussion' and the field is called 'field_pollfield'.

bryan kennedy’s picture

Version: 6.x-1.12-beta1 » 6.x-1.x-dev
Priority: Minor » Major

I'll look into how/if we need to incorporate these changes into the latest dev shortly. Increasing the priority on this one.

bryan kennedy’s picture

Assigned: Unassigned » bryan kennedy
Status: Needs review » Fixed
Issue tags: +database schema

I added both manarth and MaxF's patches to the latest dev branch. Thanks for that work! Respective commits here:
http://drupalcode.org/project/pollfield.git/commit/7a175c0
http://drupalcode.org/project/pollfield.git/commit/f0c6124

I tested the module with schema after these commit and it looks like there aren't any other db issues.

Once I get a few more major bugs sorted out I'll roll the dev code into a new release with these fixes.

Status: Fixed » Closed (fixed)
Issue tags: -database schema

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