Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When installing the module with mysql 5.7 the following error occurs:
exception 'PDOException' with message '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, [error]
use UNIQUE instead' in /Users/msti/Sites/amberroad2/includes/database/database.inc:2171
Stack trace:
#0 /Users/msti/Sites/amberroad2/includes/database/database.inc(2171): PDOStatement->execute(Array)
#1 /Users/msti/Sites/amberroad2/includes/database/database.inc(683): DatabaseStatementBase->execute(Array, Array)
#2 /Users/msti/Sites/amberroad2/includes/database/schema.inc(661): DatabaseConnection->query('CREATE TABLE {p...')
#3 /Users/msti/Sites/amberroad2/includes/database/database.inc(2720): DatabaseSchema->createTable('panelizer_entit...', Array)
#4 /Users/msti/Sites/amberroad2/includes/common.inc(7011): db_create_table('panelizer_entit...', Array)
This error is caused by the enhancements of mysql 5.7 that also bring some compatibility problems.
Comment | File | Size | Author |
---|---|---|---|
#8 | panelizer-n2659820-8.patch | 15.46 KB | DamienMcKenna |
|
Comments
Comment #2
mstiThis patch add a
'not null' => TRUE,
to the 'view_mode' field at mysqlComment #3
DamienMcKennaThat should already be added in panelizer_schema_4()..
I really don't like how these schema things are done. Does this also fix the problem?
Comment #4
DamienMcKennaComment #5
dgtlmoon CreditAttribution: dgtlmoon commentedPatch from #3 resolved the issue for me
Comment #6
lotyrin CreditAttribution: lotyrin as a volunteer commentedReading the refactor in #3 looks right. Confirmed resolves this issue.
Comment #7
dgtlmoon CreditAttribution: dgtlmoon commentedReroll for latest 3.x
Comment #8
DamienMcKennaA few minor tweaks.
Comment #9
DamienMcKennaCommitted. Thanks for bringing this up, msti, we needed to clean up the schema as it was getting difficult to maintain.