"""Add pdf_path column to car_performance_checks table"""
import sqlite3
import os

os.chdir(r'D:\Workspace\claudeCode\AutonetSellCar.com\backend')
conn = sqlite3.connect('autonet.db')
cursor = conn.cursor()

# Check if column already exists
cursor.execute('PRAGMA table_info(car_performance_checks)')
columns = [col[1] for col in cursor.fetchall()]

if 'pdf_path' not in columns:
    print("Adding pdf_path column...")
    cursor.execute('ALTER TABLE car_performance_checks ADD COLUMN pdf_path VARCHAR(500)')
    conn.commit()
    print("pdf_path column added successfully!")
else:
    print("pdf_path column already exists")

conn.close()
