From 998e15cabd144d16fa9d7c50fc6bd759a1fac4da Mon Sep 17 00:00:00 2001 From: slawkens Date: Sat, 11 Nov 2023 14:43:15 +0100 Subject: [PATCH] Dump command Doesnt work yet, just as notice --- composer.json | 4 +++- system/bin/dump_database.php | 15 +++++++++++++++ system/database.php | 2 ++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 system/bin/dump_database.php diff --git a/composer.json b/composer.json index 0d227019..8442967e 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,9 @@ "nikic/fast-route": "^1.3", "matomo/device-detector": "^6.0", "illuminate/database": "^10.18", - "peppeocchi/php-cron-scheduler": "4.*" + "illuminate/filesystem": "^10.18", + "peppeocchi/php-cron-scheduler": "4.*", + "symfony/process": "^6.3" }, "require-dev": { "filp/whoops": "^2.15", diff --git a/system/bin/dump_database.php b/system/bin/dump_database.php new file mode 100644 index 00000000..c134a249 --- /dev/null +++ b/system/bin/dump_database.php @@ -0,0 +1,15 @@ +dump($eloquentConnection, BASE . 'dump.sql'); + +echo 'Dumped.'; diff --git a/system/database.php b/system/database.php index f20ca720..438af358 100644 --- a/system/database.php +++ b/system/database.php @@ -111,6 +111,8 @@ try { $capsule->addConnection([ 'driver' => 'mysql', 'database' => $config['database_name'], + 'username' => $config['database_user'], + 'password' => $config['database_password'], ]); $capsule->getConnection()->setPdo($db);