Skip to content

Commit 81b3408

Browse files
committed
nullOnDelete() method
1 parent 6b62f14 commit 81b3408

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

database/migrations/create_places_table.php.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class CreatePlacesTable extends Migration
1818
$table->string('email')->nullable();
1919
$table->string('phone')->nullable();
2020
$table->string('website')->nullable();
21-
$table->foreignId('image_id')->nullable();
21+
$table->foreignId('image_id')->nullable()->constrained('files')->nullOnDelete();
2222
$table->string('latitude', 30)->nullable();
2323
$table->string('longitude', 30)->nullable();
2424
$table->json('status')->default(new Expression('(JSON_OBJECT())'));

0 commit comments

Comments
 (0)