SQLSTATE[42000]: Syntax error or access violation: 1171 All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead Proudly built byCommerce Guys. So there error doesn't state which table the error is for. This error happens during new profile installation: http://demo.dev/install.php?profile=commerce_kickstart&welcome=done&loca...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yingtho created an issue. See original summary.

si_odong’s picture

I got the same error and found that it caused by message_schema in message.install, modules that needed in commerce_kickstart module. If you insist to install on mysql 5.7>, simply add "'not null' => TRUE," in "mid" field (line 194) of message.install, re-run clean installation profile and it will installed flawlessly. But, it might be better to let message module or commerce_kickstart distro developer patch this issue. Hope it helps you.

mglaman’s picture

Project: Commerce Kickstart » Message
Version: 7.x-2.31 » 7.x-1.x-dev

Comment shows there's an "issue" with Message install schema. Albeit it's for MySQL 5.7, but there's a solution provided that seems to fix it.

Patch can be made in Message queue, with a patch to use the patch in CK quue.

KevinVanRansbeeck’s picture

Fixed in development branch.
For the sake of make files I created a patch which can be included for stable versions.

mglaman’s picture

Title: Installation error with Mysql 5.7 » Message patch: Installation error with Mysql 5.7
Project: Message » Commerce Kickstart

KevinVanRansbeeck thanks for info! I'll move this back to CK2 queue then, to use your patch. I'll write CK2 patch and give you authorship

mglaman’s picture

PR, waiting for tests. I'd assume they pass! https://github.com/commerceguys/commerce_kickstart/pull/173

mglaman’s picture

Status: Active » Needs review

mglaman’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

KevinVanRansbeeck’s picture

@mglaman, the patch fixes this for current version of message, but this needs fixing in the message project itself
Should I create a new ticket there, or can we move this one again so it can get fixed in message 1.12?

mglaman’s picture

In #4 you said it's fixed in their -dev branch, and I confirmed. We'd just need them to tag a release with that in it. Or if the release does have it, upgrade Message.