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.
This simple patch tests for the existence of the table before attempting the creation of the table, which avoids the PDO
"DatabaseSchemaObjectExistsException: Table cache_token already exists."
error that causes the entire update hook to fail.
Comment | File | Size | Author |
---|---|---|---|
#1 | token_safely_create_table_1464928.patch | 525 bytes | Senpai |
Comments
Comment #1
Senpai CreditAttribution: Senpai commentedComment #2
Dave ReidThanks. Committed with a minor tweak to http://drupalcode.org/project/token.git/commit/a2d2622
Comment #4
monti CreditAttribution: monti commentedreopen this issue. it is still not fixed at 7.x-1.1.
Comment #5
Dave ReidHow is this not fixed? Please try again.
Comment #6
pmaguniaNot sure why but I had this problem too in the 1.5 version. I cleared all caches, ran updates, and cron.
I took a look at cache_token and it didn't have any entries so I dropped it.
The install went fine after that.