Files
AutonetSellCar/backend/check_pdf_status.py
AutonetSellCar Deploy 1f0dcb1ddb Initial commit: AutonetSellCar platform with deployment system
- Frontend: Next.js 14 with TypeScript
- Backend: FastAPI with SQLAlchemy
- Agent: Carmodoo sync agent
- Deployment: Docker Compose based staging/production setup
- Scripts: Automated deployment with rollback support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 13:24:39 +09:00

41 lines
1.2 KiB
Python

"""Check PDF migration status"""
import sqlite3
import os
os.chdir(r'D:\Workspace\claudeCode\AutonetSellCar.com\backend')
conn = sqlite3.connect('autonet.db')
cursor = conn.cursor()
# Check total records
cursor.execute('SELECT COUNT(*) FROM car_performance_checks')
total = cursor.fetchone()[0]
# Check records with check_number
cursor.execute("SELECT COUNT(*) FROM car_performance_checks WHERE check_number IS NOT NULL AND check_number != ''")
with_check_num = cursor.fetchone()[0]
# Check records with pdf_path
cursor.execute("SELECT COUNT(*) FROM car_performance_checks WHERE pdf_path IS NOT NULL AND pdf_path != ''")
with_pdf = cursor.fetchone()[0]
print("=== Performance Check PDF Status ===")
print(f"Total records: {total}")
print(f"With check_number: {with_check_num}")
print(f"With PDF: {with_pdf}")
print(f"Pending PDF generation: {with_check_num - with_pdf}")
print()
# Show details
cursor.execute("SELECT car_id, check_number, pdf_path FROM car_performance_checks")
records = cursor.fetchall()
print("=== Details ===")
for r in records:
car_id, check_num, pdf_path = r
status = "O" if pdf_path else "X"
print(f"Car ID: {car_id}, Check#: {check_num}, PDF: {status}")
if pdf_path:
print(f" -> {pdf_path}")
conn.close()