# **🔍 Problem Overview**

Some customers experience a bug where a deleted **VacationRental** schema keeps reappearing on their pages after removal. This causes SEO optimizations to disappear overnight and prevents proper site indexing. The issue stems from a database inconsistency where schema rows marked for deletion are not properly flagged as deleted in the system.

# **🛠️ Root Cause**

Engineering identified that schema records with a `deleted_at` timestamp but `was_deleted = False` were not being fully processed. This caused the system to treat them as active, leading to automatic re-deployment of the schema during nightly reprocessing cycles.

# **✅ Permanent Fix Applied**

Engineering executed a one-time database correction: **Set `was_deleted = True` on all schema rows where `deleted_at IS NOT NULL` AND `was_deleted = False`**. They also fixed the underlying deletion code path to ensure future deletions are properly recorded and respected.

# **🧪 Verification Steps**

1. Go to **Left sidebar → OTTO SEO → Site Audit → Page Explorer**.
2. Locate a page where the VacationRental schema previously reappeared (e.g. `taking-flight-with-disc.html`).
3. Confirm the schema no longer appears on the page.
4. Wait 24 hours and recheck the page to ensure the schema does not return.
5. Verify SEO optimizations remain intact and indexing resumes normally.

# **🛡️ Prevention**

The deletion logic has been corrected so that any schema marked for deletion is immediately and permanently flagged with `was_deleted = True`. Related fixes in the OTTO pipeline now prevent silent re-deployment of stale schemas and ensure audit trails are maintained.

# **📌 Related Fixes (Completed)**

- OTTO: Domain Level Schema Retains Old Location After Removal From Brand Vault
- OTTO & Audit: Manual reprocessing is un-deploying the schema
- fix(otto): clean stale FOUND schemas for pages with no HTML schema data

If you need further assistance, open the chat widget in the bottom-right corner of the platform and type **human teammate** to be connected with a member of our team.