This commit is contained in:
lizandrogd
2026-01-19 18:24:35 -05:00
parent edcd51e651
commit 084b644714
10 changed files with 412 additions and 66 deletions
@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::create('recepciones', function (Blueprint $table) {
$table->id();
$table->string('referencia_type');
$table->unsignedBigInteger('referencia_id');
$table->unsignedBigInteger('user_id')->nullable();
$table->integer('cantidad')->unsigned();
$table->dateTime('fecha_recepcion')->nullable();
$table->text('notas')->nullable();
$table->timestamps();
$table->index(['referencia_type', 'referencia_id']);
$table->foreign('user_id')->references('id')->on('users')->onDelete('set null');
});
}
public function down()
{
Schema::dropIfExists('recepciones');
}
};