Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When installing the module with mysql 5.7 the following error occurs:
PDOException: 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 in [error]
/var/www/html/includes/database/database.inc:2227
Stack trace:
#0 /var/www/html/includes/database/database.inc(2227): PDOStatement->execute(Array)
#1 /var/www/html/includes/database/database.inc(697): DatabaseStatementBase->execute(Array, Array)
#2 /var/www/html/includes/database/schema.inc(667): DatabaseConnection->query('CREATE TABLE {a...')
#3 /var/www/html/includes/database/database.inc(2776): DatabaseSchema->createTable('amber_cache', Array)
#4 /var/www/html/includes/common.inc(7114): db_create_table('amber_cache', Array)
This error is caused by the enhancements of mysql 5.7 that also bring some compatibility problems.
Comment | File | Size | Author |
---|---|---|---|
#4 | amber-mysql5.7_compatibility-2945946-4.patch | 1.22 KB | revagomes |
Comments
Comment #2
revagomes CreditAttribution: revagomes as a volunteer commentedComment #3
revagomes CreditAttribution: revagomes as a volunteer commentedThis patch add a 'not null' => TRUE, to the 'provider' field.
Comment #4
revagomes CreditAttribution: revagomes as a volunteer commentedI've updated the patch to also add the update hook.