File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 22
33namespace App \Models ;
44
5+ use App \Traits \BelongsToTenant ;
56use Illuminate \Database \Eloquent \Factories \HasFactory ;
67
78class ImportJob extends \FamilyTree365 \LaravelGedcom \Models \ImportJob
89{
10+ use BelongsToTenant;
911 use HasFactory;
1012
1113 /**
@@ -14,6 +16,7 @@ class ImportJob extends \FamilyTree365\LaravelGedcom\Models\ImportJob
1416 * @var list<string>
1517 */
1618 protected $ fillable = [
19+ 'team_id ' ,
1720 'user_id ' ,
1821 'slug ' ,
1922 'status ' ,
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use Illuminate \Database \Migrations \Migration ;
4+ use Illuminate \Database \Schema \Blueprint ;
5+ use Illuminate \Support \Facades \Schema ;
6+
7+ return new class () extends Migration {
8+ public function up (): void
9+ {
10+ Schema::table ('importjobs ' , function (Blueprint $ table ) {
11+ $ table ->foreignId ('team_id ' )->nullable ()->constrained ('teams ' )->nullOnDelete ()->after ('user_id ' );
12+ });
13+ }
14+
15+ public function down (): void
16+ {
17+ Schema::table ('importjobs ' , function (Blueprint $ table ) {
18+ $ table ->dropForeignIdFor (\App \Models \Team::class);
19+ $ table ->dropColumn ('team_id ' );
20+ });
21+ }
22+ };
You can’t perform that action at this time.
0 commit comments