graphs
This commit is contained in:
@@ -48,4 +48,16 @@ class RecordRepo
|
||||
DB::table("edges")->whereIn("target", $ids)->delete();
|
||||
DB::table("revisions")->whereIn("recordId", $ids)->delete();
|
||||
}
|
||||
|
||||
public function deleteTrashedBySchema(
|
||||
string $schemaName,
|
||||
): void
|
||||
{
|
||||
$ids = DB::table("records")
|
||||
->where("schema", $schemaName)
|
||||
->where("status", Status::TRASHED->value)
|
||||
->get()->pluck("id")->toArray();
|
||||
|
||||
$this->deleteMany($ids);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user