Dump command

Doesnt work yet, just as notice
This commit is contained in:
slawkens
2023-11-11 14:43:15 +01:00
parent c81861d8c8
commit 998e15cabd
3 changed files with 20 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
<?php
if(PHP_SAPI !== 'cli') {
echo 'This script can be run only in command line mode.';
exit(1);
}
require_once __DIR__ . '/../../common.php';
require_once SYSTEM . 'functions.php';
require_once SYSTEM . 'init.php';
$test = new \Illuminate\Database\Schema\MySqlSchemaState($eloquentConnection);
$test->dump($eloquentConnection, BASE . 'dump.sql');
echo 'Dumped.';

View File

@@ -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);