Skip to content

Commit

Permalink
feat: added meta_data column
Browse files Browse the repository at this point in the history
  • Loading branch information
sriramkanakam87 committed Dec 13, 2024
1 parent 5561b5d commit 82a3bd5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Models/Issue.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ class Issue extends Model implements Auditable
*/
public function molecules(): BelongsToMany
{
return $this->belongsToMany(Molecule::class)->withPivot('is_active', 'is_resolved')->withTimestamps();
return $this->belongsToMany(Molecule::class)->withPivot('is_active', 'is_resolved', 'meta_data')->withTimestamps();
}
}
2 changes: 1 addition & 1 deletion app/Models/Molecule.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function related()
*/
public function issues(): BelongsToMany
{
return $this->belongsToMany(Issue::class)->withPivot('is_active', 'is_resolved')->withTimestamps();
return $this->belongsToMany(Issue::class)->withPivot('is_active', 'is_resolved', 'meta_data')->withTimestamps();
}

public function transformAudit(array $data): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public function up(): void
$table->foreignId('molecule_id');
$table->boolean('is_active')->default(true);
$table->boolean('is_resolved')->default(false);
$table->jsonb('meta_data')->nullable();
$table->timestamps();
});
}
Expand Down

0 comments on commit 82a3bd5

Please sign in to comment.