Skip to content

Commit

Permalink
chore: remove stupid out of context migration command
Browse files Browse the repository at this point in the history
  • Loading branch information
darkterminal committed Jul 12, 2024
1 parent e8c3be5 commit 6ed155f
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/Database/LibSQLConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public function getConnectionMode(): string

public function statement($query, $bindings = []): bool
{
$this->select($query, $bindings);
$res = $this->select($query, $bindings);

return $this->isRunningMigrations();
return !empty($res);
}

public function getPdo(): LibSQLDatabase
Expand Down Expand Up @@ -152,14 +152,4 @@ public function quote(string $value): string
{
return $this->escapeString($value);
}

protected function isRunningMigrations()
{
$commands = [
'tenants:migrate',
'tenants:rollback',
];

return App::runningInConsole() && in_array($_SERVER['argv'][1], $commands);
}
}

0 comments on commit 6ed155f

Please sign in to comment.