Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
lennardv2 authored and github-actions[bot] committed Jun 21, 2023
1 parent 7cfd900 commit c93b807
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Modules/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,18 @@ public function onSelect(?string $key = null)
$item = (array) $item;
// First key
$carry[] = $item[array_key_first($item)];

return $carry;
}, []);

$output = "[table_schema]\n\n";

foreach($tables as $table) {
foreach ($tables as $table) {
$output .= "Table: $table\n\n";
$columns = DB::select('SHOW COLUMNS FROM ' . $table);
foreach($columns as $column) {
$columns = DB::select('SHOW COLUMNS FROM '.$table);
foreach ($columns as $column) {
$column = (array) $column;
$output .= "* " . $column['Field'] . " (" . $column['Type'] . ")\n";
$output .= '* '.$column['Field'].' ('.$column['Type'].")\n";
}
}

Expand Down Expand Up @@ -82,7 +83,7 @@ public function addToChatHistory(string $string)
public function notice()
{
if ($this->schema) {
$this->cmd->info("Schema is attached to this conversation.");
$this->cmd->info('Schema is attached to this conversation.');
$this->cmd->newLine(2);
}
}
Expand Down

0 comments on commit c93b807

Please sign in to comment.