diff --git a/database/migrations/add_type_column_to_invoices_table.php.stub b/database/migrations/add_type_column_to_invoices_table.php.stub index 220181b..1c436c8 100644 --- a/database/migrations/add_type_column_to_invoices_table.php.stub +++ b/database/migrations/add_type_column_to_invoices_table.php.stub @@ -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(); }); } diff --git a/database/migrations/create_invoices_table.php.stub b/database/migrations/create_invoices_table.php.stub index f1b46d9..ea886af 100644 --- a/database/migrations/create_invoices_table.php.stub +++ b/database/migrations/create_invoices_table.php.stub @@ -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();