OwlCyberSecurity - MANAGER
Edit File: 2024_01_13_170758_create_stores_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. */ public function up(): void { Schema::create('stores', function (Blueprint $table) { $table->id(); $table->string('address', 50)->nullable(); $table->unsignedBigInteger('category_id')->nullable(); $table->string('description', 50)->nullable(); $table->string('slug', 50)->nullable(); $table->unsignedBigInteger('file_id')->nullable(); $table->unsignedBigInteger('seo_id')->nullable(); $table->softDeletes(); $table->timestamps(); $table->foreign('category_id')->references('id')->on('categories')->onDelete('set null'); $table->foreign('file_id')->references('id')->on('files')->onDelete('set null'); $table->foreign('seo_id')->references('id')->on('seos')->onDelete('set null'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('stores'); } };