hustoj /
hustoj-neo
| 1 | <?php |
||
| 2 | |||
| 3 | namespace App\Console\Commands; |
||
| 4 | |||
| 5 | use App\Console\Commands\Migrations\ArticleMigration; |
||
| 6 | use App\Console\Commands\Migrations\ContestMigration; |
||
| 7 | use App\Console\Commands\Migrations\LoginLogMigration; |
||
| 8 | use App\Console\Commands\Migrations\OptionMigration; |
||
| 9 | use App\Console\Commands\Migrations\ProblemMigration; |
||
| 10 | use App\Console\Commands\Migrations\SolutionMigration; |
||
| 11 | use App\Console\Commands\Migrations\TopicMigration; |
||
| 12 | use App\Console\Commands\Migrations\UserMigration; |
||
| 13 | use Illuminate\Console\Command; |
||
| 14 | |||
| 15 | class DatabaseMigration extends Command |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * The name and signature of the console command. |
||
| 19 | * |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | protected $signature = 'database:migrate'; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * The console command description. |
||
| 26 | * |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | protected $description = 'migrate from old hustoj'; |
||
| 30 | |||
| 31 | private $commands = [ |
||
| 32 | UserMigration::class, |
||
| 33 | ProblemMigration::class, |
||
| 34 | ContestMigration::class, |
||
| 35 | SolutionMigration::class, |
||
| 36 | TopicMigration::class, |
||
| 37 | ArticleMigration::class, |
||
| 38 | LoginLogMigration::class, |
||
| 39 | OptionMigration::class, |
||
| 40 | ]; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Execute the console command. |
||
| 44 | */ |
||
| 45 | public function handle() |
||
| 46 | { |
||
| 47 | foreach ($this->commands as $clz) { |
||
| 48 | app($clz)->handle($this); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 49 | } |
||
| 50 | } |
||
| 51 | } |
||
| 52 |