Skip to content

Commit

Permalink
add indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed Sep 8, 2024
1 parent 6571efd commit 320ecde
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ return new class extends Migration
public function up(): void
{
Schema::table('invoices', function (Blueprint $table) {
$table->string('type')->default('invoice');
$table->string('type')->default('invoice')->index();
$table->foreignId('parent_id')->nullable();
});
}
Expand Down
2 changes: 1 addition & 1 deletion database/migrations/create_invoices_table.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ return new class extends Migration
**/
$table->binary('logo')->nullable();

$table->string('state');
$table->string('state')->index();
$table->dateTime('state_set_at')->nullable();

$table->dateTime('due_at')->nullable();
Expand Down

0 comments on commit 320ecde

Please sign in to comment.