Skip to content

Commit 28850ea

Browse files
authored
Merge pull request #37 from helldivers-2/main
changed command
2 parents d39a7ba + 2781acb commit 28850ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Console/Commands/migrate_planet_history_fix.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ public function handle()
6767
$model->valid_start = $model->created_at->getTimestamp();
6868
$model->save();
6969
$this->info($model->id.' | '.$model->valid_start.' | '.$model->last_valid);
70-
} else if ($this->argument('id') == 0)
70+
} else if ($this->argument('id') == '+' && $this->argument('mode') != null)
7171
{
7272

7373

74-
PlanetHistory::where('last_valid', 0)->chunk(100, function($models) {
74+
PlanetHistory::where('id', '>=', $this->argument('mode'))->chunk(100, function($models) {
7575

7676
foreach($models as $model) {
7777
$p = PlanetHistory::where('id', '>', $model->id)->where('index', $model->index)->orderBy('id', 'ASC')->first();

0 commit comments

Comments
 (0)