Skip to content

Commit

Permalink
Stubs changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
halilcosdu committed May 10, 2024
1 parent 54f5b5e commit 92ca2ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ public function up()
$table->boolean('is_analyzed')->default(false)->index();
$table->longtext('bindings');
$table->longtext('sql');
$table->float('time')->index();
$table->float('time')->nullable()->index();
$table->string('connection');
$table->string('connection_name');
$table->string('connection_name')->nullable();
$table->longtext('raw_sql');
$table->longtext('recommendation')->nullable();

Expand Down
4 changes: 2 additions & 2 deletions database/migrations/create_slower_table.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ return new class extends Migration
$table->boolean('is_analyzed')->default(false)->index();
$table->longtext('bindings');
$table->longtext('sql');
$table->float('time')->index();
$table->float('time')->nullable()->index();
$table->string('connection');
$table->string('connection_name');
$table->string('connection_name')->nullable();
$table->longtext('raw_sql');
$table->longtext('recommendation')->nullable();

Expand Down
2 changes: 1 addition & 1 deletion src/Services/RecommendationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function getRecommendation($record): ?string

private function extractIndexesAndSchemaFromRecord($record): array
{
$schemaBuilder = DB::connection($record->connection_name)->getSchemaBuilder();
$schemaBuilder = DB::connection($record->getConnectionName())->getSchemaBuilder();

$columns = $schemaBuilder->getColumnListing($record->getTable());

Expand Down

0 comments on commit 92ca2ba

Please sign in to comment.