- Issue created by @loze
- First commit to issue fork.
- Status changed to Needs review
about 1 year ago 6:19am 1 November 2023 - 🇮🇳India viren18febS
HI @loze
I have updated .install file for the Add primary key & added MR or Patch, please review.
For
The recommended level for Drupal is "READ COMMITTED".
we need to add below code in database connection settings in settings.php file.'init_commands' => [ 'isolation_level' => 'SET SESSION tx_isolation=\'READ-COMMITTED\'', ],
- 🇦🇺Australia geoffreyr
We should probably add a hook_update implementation to add the primary key for cases where it does not already exist.
- 🇦🇺Australia geoffreyr
Just pushed an update to the merge request adding an update hook to add the `id` column if it's not already there. This will help users with existing installations.
Sorry about the implementation, it's hacky, but I couldn't find a better way. The issue https://www.drupal.org/project/drupal/issues/3264915 💬 Can't update database: Syntax error or access violation: 1075 Incorrect table definition Closed: duplicate describes a similar problem.
We might need to check other database types (SQLite, Postgres) to see if this method is valid or not.