Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cachet.metric_points doesn't exist (mySQL) #2104

Closed
optiroot opened this issue Sep 20, 2016 · 3 comments
Closed

cachet.metric_points doesn't exist (mySQL) #2104

optiroot opened this issue Sep 20, 2016 · 3 comments

Comments

@optiroot
Copy link

production.ERROR: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cachet.metric_points' doesn't exist in /home/cachet/public_html/status/vendor/laravel/framework/src/Illuminate/Database/Connection.php:333

Like in #1938 this time is for the "metric_points" table. In fact I was using a prefix for the tables and using it will cause a 500 error (the page will load normally, but the metric will not - in fact checking in Browser Console it gives back a 500 error to the metric page).

Renaming my tables without the prefix and updating the .env will fix the problem.

This is ever about prefixes in database tables!

@ConnorVG
Copy link
Contributor

  • What is your prefix set to in .env (including the key, ie: SOME_KEY=Some value!?
  • Can you list the tables in your database?

As far as I am aware, this should get around this issue.

What version of Cachet are you using?

@jbrooksuk
Copy link
Member

jbrooksuk commented Sep 21, 2016

What version of Cachet are you using?

This is important, because I'm pretty sure that it's definitely fixed in v2.3 :)

@optiroot
Copy link
Author

optiroot commented Sep 21, 2016

@ConnorVG
I was using st_ as prefix, but to fix this problem I had to remove it and renaming all the database tables.
The tables are:
cache, components, component_groups, component_tag, failed_jobs, incidents, incident_templates, invites, jobs, metrics, metric_points, migrations, sessions, settings, subscribers, subscriptions, tags, users

For best understanding, I attach a screenshot from phpMyAdmin:
image

But please keep in mind that when I had the problem it was before I removed the st_ as prefix. So, before I fixed this removing the prefix, all my database tables were with st_ before the name of the table (eg. st_cache, st_components etc.).


@jbrooksuk
I'm using the 2.4.0-dev, as seen in dashboard -> settings

Now I don't have any problem just because I renamed the tables, but I had before. This is just to make the thing known, but there is no problem to not use any prefix, at least for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants