wallet handling 2
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
use Illuminate\Database\Console\Migrations\MigrateCommand as BaseMigrateCommand;
|
||||
use Illuminate\Database\Migrations\Migrator;
|
||||
|
||||
class MigrateCommand extends BaseMigrateCommand
|
||||
{
|
||||
public function __construct(Migrator $migrator, Dispatcher $dispatcher)
|
||||
{
|
||||
parent::__construct($migrator, $dispatcher);
|
||||
}
|
||||
|
||||
/**
|
||||
* Never auto-load database/schema/*.sql — it DROP TABLEs and wipes production data
|
||||
* when the migrations table is empty. Use baseline_migrations.sql on existing DBs.
|
||||
*/
|
||||
protected function prepareDatabase()
|
||||
{
|
||||
if (! $this->migrator->repositoryExists()) {
|
||||
$this->call('migrate:install', array_filter([
|
||||
'--database' => $this->option('database'),
|
||||
]));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user