I inherited a Drupal 7 site that appears to have a history.
I'm receiving the following error when updating modules or clearing the cache:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'website_staging.search_api_server' doesn't exist: SELECT base.id AS id, base.name AS name, base.machine_name AS machine_name, base.description AS description, base.class AS class, base.options AS options, base.enabled AS enabled, base.status AS status, base.module AS module FROM {search_api_server} base WHERE (base.status IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2)) ; Array ( [:db_condition_placeholder_0] => 3 [:db_condition_placeholder_1] => 2 [:db_condition_placeholder_2] => 6 ) in EntityAPIController->query() (line 187 of /home/website/apps/api/docroot/sites/all/modules/entity/includes/entity.controller.inc).
The question is: where in the database do I need to remove any and all traces that point to this table?
Background:
I figured this was just a module that somehow did not install its tables right somehow. Uninstall, reinstall and done, right?
Two problems:
- Uninstalling a module also yields this error, and does not work
- The Search API module (http://drupal.org/project/search_api) never was installed at all
It appears the previous developers created a custom module, and named it 'search_api'. My guess is that later they went and did a blanket update of the site modules using drush, and starting updating the custom module far enough to install something to the database. Then they realized their mistake, and replaced the custom module in its original location (but did not rename it).
Nowhere in my modules is there a pointer to the search_api_server table, so it must be somewhere in the database.
So my plan as it stands is:
- Somehow fix the error
- Uninstall the custom search_api module
- Rename the custom search_api module and reinstall
And I need some help with step 1