mirror of
https://github.com/cachethq/cachet.git
synced 2026-07-01 08:15:55 +00:00
In the '.env' file, a 'DB_PREFIX' sets the prefix that should be used on every table name. When writing an SQL query the 'DB_PREFIX' value has to be prefixed to the table name. The repository PgSqlRepository, MySqlRepository and SqliteRepository, located in 'app/Repositories/Metric/' did not apply this prefix on the 'metric_points' table. The problem occured only when we set a 'DB_PREFIX' not null, the rest of the application worked correctly but the part about 'metric_points' couldn't work, saying the table was inexistant. A method was added in the repository AbstractMetricRepository to get the 'metric_points' table name with the prefix if there is one. This method is used in the three repositories to get the right table name. Note: This problem was present in 2.3, but was already fixed in 2.4 so there is no need to apply this commit on the 2.4 branch. See: CachetHQ/Cachet/#2955
5.3 KiB
5.3 KiB