diff --git a/token.install b/token.install index 5ac9651..62ea40f 100644 --- a/token.install +++ b/token.install @@ -49,6 +49,18 @@ function token_schema() { } /** + * Implements hook_enable(). + */ +function token_enable() { + // When upgrading from Token module 6.x, we have to explicitly create the + // cache_token table because hook_schema is only fired on first installs. + if (drupal_get_installed_schema_version('token') < 7000) { + token_update_7000(); + drupal_set_installed_schema_version('token', 7000); + } +} + +/** * Add the cache_token table. */ function token_update_7000() {