Have you ever seen an error message in your logs that makes you say, "What?! This doesn't tell me anything!" Well, we recently saw such an error and it turns it out that it was useful it's just that we were not familiar with the system yet.
This is the error we saw and it got us running around trying to figure what was going on for over a week -
"ERROR: relational 'drupal_' does not exist at character 18"
"STATEMENT: SELECT t.* from drupal_ t WHERE (name = 'company_invitation_non_mint')"
We just recently integrated Apigee into our systems along with DevPortal, and Drupal is new to us as well. So we have a learning curve.
So, what caused our issue? It turns out that during our last deployment we found that our deployment environment was missing some configurations, which left our DevPortal instance unstable. Restarting the application caused the database (postgresql) to be unstable, and unable to detokenize the table name to query. As we know now, all tables are prefixed with "drupal_" (note, this is in your settings.php).
Here are some more details into the debugging steps we took. Hopefully, this can help you or at least guide you if you see a similar issue.
These are the specific tables, but before truncating all cache tables we first tried truncating ‘drupal_cache_eck’ to try to isolate any potential impact, but that didn’t work.
truncate table drupal_cache; truncate table drupal_cache_admin_menu; truncate table drupal_cache_block; truncate table drupal_cache_bootstrap; truncate table drupal_cache_devconnect_developer_is_active; truncate table drupal_cache_eck; truncate table drupal_cache_features; truncate table drupal_cache_field; truncate table drupal_cache_filter; truncate table drupal_cache_form; truncate table drupal_cache_image; truncate table drupal_cache_libraries; truncate table drupal_cache_menu; truncate table drupal_cache_page; truncate table drupal_cache_path; truncate table drupal_cache_rules; truncate table drupal_cache_token; truncate table drupal_cache_update; truncate table drupal_cache_views; truncate table drupal_cache_views_data; truncate table drupal_ctools_css_cache; truncate table drupal_ctools_object_cache;
Clearing out these tables is similar to running 'drush cc all'.
You can find out more about clearing cache here : https://www.drupal.org/docs/7/administering-drupal-7-site/clearing-or-rebuilding-drupals-cache
Hope this is helpful!