move cte max to conf file

This commit is contained in:
hackerESQ
2024-09-11 23:34:34 -05:00
parent ee8503886d
commit f2adeff074
3 changed files with 3 additions and 9 deletions
-9
View File
@@ -232,15 +232,6 @@ class Holding extends Model
$date_interval = "DATE_ADD(date, INTERVAL 1 DAY)";
try {
DB::statement('SET GLOBAL cte_max_recursion_depth = 25000;');
} catch (\Throwable $e) {
Log::info('Couldn\'t set the max CTE recursion depth config.');
}
if (config('database.default') === 'sqlite') {
$date_interval = "date(date, '+1 day')";
+1
View File
@@ -41,6 +41,7 @@ services:
MYSQL_PASSWORD: ${DB_PASSWORD:-investbrain}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-investbrain}
volumes:
- ./docker/mysql.conf:/etc/mysql/my.cnf
- investbrain-mysql:/var/lib/mysql
networks:
- investbrain-network
+2
View File
@@ -0,0 +1,2 @@
[mysqld]
cte_max_recursion_depth = 25000