fix migration file error

This commit is contained in:
xiaomlove
2021-06-09 17:09:16 +08:00
parent c771ff9ef1
commit 36b8e9a3db
7 changed files with 9 additions and 100 deletions
-47
View File
@@ -1,47 +0,0 @@
<?php
namespace App\Console\Commands\Install;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
class InitData extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'install:init_data';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Initialize data.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
DB::transaction(function () {
$this->call('db:seed');
});
$this->info("[INIT DATA] success.");
return 0;
}
}
-47
View File
@@ -1,47 +0,0 @@
<?php
namespace App\Console\Commands\Install;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
class Migrate extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'install:migrate';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Migrate tables.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
DB::transaction(function () {
$this->call('migrate');
});
$this->info("[MIGRATE TABLE] success.");
return 0;
}
}