Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Schema/CockroachSchemaState.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function dump(Connection $connection, $path): void
});

if ($statements !== []) {
$file .= PHP_EOL . $statements[0]['query'];
$file .= PHP_EOL . $statements[0]['query'] .(ends_with(trim($statements[0]['query']), ';') ? '' : ';');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ends_with will never work as the helper isn't installed in all applications with Laravel.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$file .= PHP_EOL . $statements[0]['query'] .(ends_with(trim($statements[0]['query']), ';') ? '' : ';');
$file .= PHP_EOL . Str::finish($statements[0]['query'], ';');

And import use Illuminate\Support\Str;

}

$this->files->put($path, $file);
Expand Down