remove ref counting, will be replaced by cleanup jobs or triggers

This commit is contained in:
2018-07-22 06:47:59 +02:00
parent e01c63cfa2
commit 9081b38425
7 changed files with 3 additions and 53 deletions
-13
View File
@@ -12,7 +12,6 @@ use Riesjart\Relaquent\Model\Concerns\HasRelaquentRelationships;
* @property int $id
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
* @property int $refs
* @property int $ancestor_id
* @property string $note
* @property object $columns
@@ -26,18 +25,6 @@ class Revision extends Model
use HasRelaquentRelationships;
protected $guarded = [];
protected static function boot()
{
parent::boot();
static::deleting(function(Revision $self) {
// update refcounts
$self->rows()->decrement('refs');
$self->rows()->where('refs', '<=', 0)->delete();
});
}
/** Included rows */
public function rows()
{