Found this one trying to install the 'Image Picker' module. Looks like it creates a table with an unsigned column called 'public', which ends up with the following definition currently:
[public] smallint NOT NULL CONSTRAINT drupal_imagepicker_user_groups_public_df DEFAULT 0 CHECK (public >= 0)
This breaks as public is a keyword, so I've added a patch to wrap the column inside the CHECK with square brackets to prevent this:
[public] smallint NOT NULL CONSTRAINT drupal_imagepicker_user_groups_public_df DEFAULT 0 CHECK ([public] >= 0)
Sorry, bit of a contrib. newbie so hopefully this is done correctly! Cheers
| Comment | File | Size | Author |
|---|---|---|---|
| sqlsrv-unsigned-keyword.patch | 413 bytes | CapBBeard |
Comments
Comment #1
nitram2000 commentedThe patch works fine - it also fixes the installation problems for workbench_moderation: http://drupal.org/node/1260112
Best regards,
Martin
Comment #2
hass commentedTypically we don't use reserved sql column names or other trouble makers in drupal. We avoid this also for mysql. Date module and core have such a piece of code just for a mysql bug in one mysql version.
See #395156: MySQL 5.0.67: Table 'drupal6.date_format' not created
Comment #3
xenphibian commentedI had created a patch similar to this one (with a couple of other changes) that also fixes the schema problems with Private Email module (privatemsg).
@hass Yes, one should avoid using known keywords, but we can't all know every keyword of every future database.
Comment #4
omegamonk commented@CapBBeard: Thanks for the patch. I just made a commit from #1830024: Cannot execute db_change_field() to convert nvarchar to varbinary for this very issue. Closing as duplicate.