Skip to content

MySQL Error on 7.5.0 upgrade #4538

@robinsowell

Description

@robinsowell

User did a 1-click and got:

We stopped on Preflight check.

SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'field_id_837' at row 1:

ALTER TABLE exp_channel_data CHANGE COLUMN `field_id_837` `field_id_837` bigint(10) DEFAULT 0

That's the update for dates to change the field to bigint(10). Note- that this must be an old site- error was in the exp_channel_data field. I checked back to ee3 and a date column SHOULD have been int with default 0, but obviously in this case it wasn't. I'm not sure if it's because it goes back older than that or if perhaps the fieldtype was switched at one point or what. I'm also not sure if this is a very freak case or something that wouldn't be particularly odd with older sites.

But- I'm wondering if there would be any harm in updating that update to set any empty strings to 0 before running the alter table? Or some other mechanism for making sure they don't hit this.

Right now, they're holding off updating and worst case, I can go in and manually do the change before they run it. But it seems like it would be better if we did it in the update script as long as there aren't any unforseen consequences, which... I'm not spotting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: AcceptedBug has been confirmed, is reproducible, and ready to work on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions