use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateProductsTable extends Migration { public function up() { Schema::create('products', function (Blueprint $table) { $table->id(); $table->foreignId('seller_id')->constrained('users')->onDelete('cascade'); $table->foreignId('category_id')->nullable()->constrained('categories')->onDelete('set null'); $table->foreignId('brand_id')->nullable()->constrained('brands')->onDelete('set null'); $table->string('name'); $table->text('flavour_profile'); $table->string('nicotine_strength'); $table->string('size'); $table->integer('pack_size'); $table->text('description'); $table->string('image_path')->nullable(); $table->enum('status', ['active', 'inactive'])->default('active'); $table->timestamps(); }); } public function down() { Schema::dropIfExists('products'); } }