_delete_aap_11.py
506 Bytes
import sqlite3
conn = sqlite3.connect("dev.db")
cur = conn.cursor()
cur.execute("SELECT id, agent_id, position_id, created_at FROM ai_agent_positions WHERE id = ?", (10,))
before = cur.fetchall()
print("BEFORE:", before)
cur.execute("DELETE FROM ai_agent_positions WHERE id = ?", (10,))
print("rows_deleted:", cur.rowcount)
conn.commit()
cur.execute("SELECT id, agent_id, position_id, created_at FROM ai_agent_positions WHERE id = ?", (10,))
after = cur.fetchall()
print("AFTER:", after)
conn.close()