MUCHOS CAMBIOS (IMPORTANTES)

This commit is contained in:
BryamE
2026-01-07 03:35:59 -03:00
parent fb37cc2059
commit ed27d03373
9 changed files with 236 additions and 19 deletions
@@ -21,12 +21,12 @@ return new class extends Migration
$table->decimal('cost', 10, 2)->nullable(); // Costo (solo admin)
$table->integer('stock_quantity')->default(0);
$table->integer('min_stock_alert')->default(5); // Alerta
$table->integer('min_stock_alert'); // Alerta
$table->enum('type', ['bike', 'accessory', 'service']);
$table->string('serial_number')->nullable(); // Solo para bicis
$table->foreignId('suppliers_id')->constrained();
$table->foreignId('suppliers_id')->constrained()->default(1);
$table->timestamps();
});
}
@@ -0,0 +1,22 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('products', function (Blueprint $table) {
$table->string('image_path')->nullable()->after('type');
});
}
public function down(): void
{
Schema::table('products', function (Blueprint $table) {
$table->dropColumn('image_path');
});
}
};