When installing the module with Drupal 8.7 I get the following error:
"Drupal\Core\Database\SchemaException: The 'entity_id' field specification does not define 'not null' as TRUE. in Drupal\Core\Database\Schema->ensureNotNullPrimaryKey() (line 734 of /srv/bindings/fb3a7421326d49c29f342ea868d533cd/code/web/core/lib/Drupal/Core/Database/Schema.php)."
It looks like this will eventually be fixed in core bug #2841291: Fix NOT NULL handling in the entity storage and 'primary key' changes when updating the storage definition of an identifier field, but in the meantime the following change fixes it, although I don't think it is the optimal way to solve the problem. The core issue says:
developers have to know about this limitation of entity API and override \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::getSharedTableFieldSchema() in order to mark fields as NOT NULL.
so that is probably the better way to solve the problem, but outside of my wheelhouse.
Comment | File | Size | Author |
---|---|---|---|
#3 | Vote Anonymous_Before_patch_3.png | 119.22 KB | krina.addweb |
#3 | Vote Anonymous_Before_patch_2.png | 73.81 KB | krina.addweb |
#3 | Vote Anonymous_Before_patch_1.png | 178.26 KB | krina.addweb |
#3 | Vote Anonymous_After_patch_2.png | 125.42 KB | krina.addweb |
#3 | Vote Anonymous_after_patch_1.png | 116.32 KB | krina.addweb |
Comments
Comment #2
BrightBoldComment #3
krina.addweb CreditAttribution: krina.addweb at AddWeb Solution Pvt. Ltd. commented@BrightBold, Thanks for the patch. Your patch is working fine as it resolves the fatal error while installing the module. PFA
Comment #4
krina.addweb CreditAttribution: krina.addweb at AddWeb Solution Pvt. Ltd. commentedComment #5
Devendra Mishra CreditAttribution: Devendra Mishra commented@BrightBold, Thank you for your patch.
Comment #6
Devendra Mishra CreditAttribution: Devendra Mishra commentedI have tested and then applied the patch in updated release 8.x-1.2. Thanks for helping @BrightBold & @krina.addweb.