import psycopg2

# Database connection parameters
DB_PARAMS = {
    'dbname': 'bookbeach',
    'user': 'postgres',
    'password': '',
    'host': 'localhost',
    'port': '5432'
}

def check_columns():
    """Check if company_uuid column exists in companies table"""
    try:
        conn = psycopg2.connect(**DB_PARAMS)
        cursor = conn.cursor()
        
        # Check if company_uuid column exists
        cursor.execute("""
            SELECT column_name 
            FROM information_schema.columns 
            WHERE table_name = 'companies' AND column_name = 'company_uuid'
        """)
        company_uuid_exists = cursor.fetchone() is not None
        
        # Check if company_id column exists
        cursor.execute("""
            SELECT column_name 
            FROM information_schema.columns 
            WHERE table_name = 'companies' AND column_name = 'company_id'
        """)
        company_id_exists = cursor.fetchone() is not None
        
        print(f"company_uuid exists: {company_uuid_exists}")
        print(f"company_id exists: {company_id_exists}")
        
        cursor.close()
        conn.close()
        
    except Exception as e:
        print(f"Error checking columns: {e}")

if __name__ == "__main__":
    check_columns()