Skip to content

Commit 320ecde

Browse files
committed
add indexes
1 parent 6571efd commit 320ecde

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

database/migrations/add_type_column_to_invoices_table.php.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ return new class extends Migration
1212
public function up(): void
1313
{
1414
Schema::table('invoices', function (Blueprint $table) {
15-
$table->string('type')->default('invoice');
15+
$table->string('type')->default('invoice')->index();
1616
$table->foreignId('parent_id')->nullable();
1717
});
1818
}

database/migrations/create_invoices_table.php.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ return new class extends Migration
2626
**/
2727
$table->binary('logo')->nullable();
2828

29-
$table->string('state');
29+
$table->string('state')->index();
3030
$table->dateTime('state_set_at')->nullable();
3131

3232
$table->dateTime('due_at')->nullable();

0 commit comments

Comments
 (0)