id(); $table->unsignedBigInteger('receip_id')->nullable(); $table->foreign('receip_id')->nullable()->references('id')->on('receipts')->onUpdate('cascade')->onDelete('cascade'); $table->unsignedBigInteger('causal_id'); $table->foreign('causal_id')->nullable()->references('id')->on('causals')->onUpdate('cascade')->onDelete('cascade'); $table->json('when')->nullable(); $table->integer('commercial')->default(1); $table->decimal('amount', $precision = 8, $scale = 2); $table->string('note')->nullable(); $table->softDeletes(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('receipts_rows'); } };