db_forget
Permanently delete table or column annotations from the knowledge store. Use to remove wrong annotations or clean up after a table is dropped from the database.
Instructions
Permanently delete a table or column annotation. Safe by default — NOT reversible.
Use to remove a wrong annotation, or to clean up after a table/column was
dropped from the DB (pairs with db_detect_drift). Unlike db_deprecate, this
hard-deletes. Cascade is opt-in so you can't nuke a table by accident:
- db_forget(table) -> ONLY the table's own annotation
- db_forget(table, column="x") -> ONLY that column's annotation
- db_forget(table, cascade=True) -> the table + all its column annotations
+ all relationships touching it
Only the local knowledge store is changed — never the live database.
Args:
table: Table name, optionally schema-qualified (e.g. "users",
"public.users", "dbo.Orders", "mydb.orders").
connection: Connection name. Defaults to first defined.
column: Column annotation to delete. Omit to target the table.
cascade: When targeting a table, also delete its columns +
relationships. Ignored when column is given.
Returns:
{table, connection, column, removed_table, removed_columns, removed_relationships}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| connection | No | ||
| column | No | ||
| cascade | No |