diff --git a/database/migrations/create_partners_table.php.stub b/database/migrations/create_partners_table.php.stub index 6bc4cca..d4d0a12 100644 --- a/database/migrations/create_partners_table.php.stub +++ b/database/migrations/create_partners_table.php.stub @@ -16,7 +16,7 @@ class CreatePartnersTable extends Migration $table->id(); $table->boolean('homepage')->default(0); $table->integer('position')->unsigned()->default(1); - $table->foreignId('image_id')->nullable(); + $table->foreignId('image_id')->nullable()->constrained('files')->nullOnDelete(); $table->json('status')->default(new Expression('(JSON_OBJECT())')); $table->json('title')->default(new Expression('(JSON_OBJECT())')); $table->json('slug')->default(new Expression('(JSON_OBJECT())'));