Skip to content

DB instructions

Volodymyr Stelmashchuk edited this page Jun 7, 2026 · 1 revision

Drop project without owner

[
  {
    $lookup: {
      from: "users",
      localField: "ownerId",
      foreignField: "id",
      as: "result"
    }
  },
  { $match: { result: { $ne: [] } } },
  { $unset: "result" },
  { $out: "projects" }
]

Clone this wiki locally