where('"#{ Katello::CapsuleLifecycleEnvironments.table_name}"."capsule_id" IS NULL

i mean