Convert all Chinese comments, docstrings, logger/print output, HTTPException detail messages, and API response messages to English across the entire codebase. Functional zh/ja localized strings (e.g. prompt templates, timezone display names, date formats) are preserved as-is. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
604 B
Python
28 lines
604 B
Python
#!/usr/bin/env python
|
|
"""Drop all mem0-related tables"""
|
|
|
|
import psycopg2
|
|
from utils.settings import CHECKPOINT_DB_URL
|
|
|
|
conn = psycopg2.connect(CHECKPOINT_DB_URL)
|
|
cursor = conn.cursor()
|
|
|
|
# Find all tables starting with mem0
|
|
cursor.execute("""
|
|
SELECT tablename FROM pg_tables
|
|
WHERE schemaname = 'public' AND tablename LIKE 'mem0_%'
|
|
""")
|
|
|
|
tables = cursor.fetchall()
|
|
print('Found tables:', tables)
|
|
|
|
# Drop each table
|
|
for (table,) in tables:
|
|
cursor.execute(f'DROP TABLE IF EXISTS {table} CASCADE')
|
|
print(f'Dropped: {table}')
|
|
|
|
conn.commit()
|
|
cursor.close()
|
|
conn.close()
|
|
print('Drop completed')
|