got rid of proposal-column references

This commit is contained in:
2018-07-14 14:41:59 +02:00
parent 7493d3e176
commit 8efa08b1cc
5 changed files with 4 additions and 99 deletions
-23
View File
@@ -18,29 +18,6 @@ class Proposal extends Model
use Reportable;
use NotificationContext;
protected static function boot()
{
parent::boot();
static::deleting(function(Proposal $self) {
// update refcounts
$self->addedRows()->decrement('refs');
$self->removedRows()->decrement('refs');
});
}
/** Added rows */
public function addedRows()
{
return $this->belongsToMany(Row::class, 'proposal_add_row_pivot');
}
/** Removed rows */
public function removedRows()
{
return $this->belongsToMany(Row::class, 'proposal_remove_row_pivot');
}
/** Authoring user */
public function author()
{