id(); $table->unsignedInteger('company_id')->index(); $table->unsignedInteger('invoice_id')->index(); $table->string('nif'); $table->string('date'); $table->string('invoice_number'); $table->string('hash'); $table->string('previous_hash')->nullable(); $table->string('status'); $table->json('response')->nullable(); $table->text('state')->nullable(); $table->timestamps(); $table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade')->onUpdate('cascade'); $table->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade')->onUpdate('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { // } };