#!/usr/bin/env python3
"""
Check current restaurants table schema
"""

from sqlalchemy import create_engine, text
from urllib.parse import quote_plus

def check_restaurants_schema():
    DATABASE_URL = f"postgresql://postgres:{quote_plus('F@f@k0s!!')}@localhost:5432/bookbeach"
    engine = create_engine(DATABASE_URL)
    
    with engine.connect() as db:
        result = db.execute(text("""
            SELECT column_name, data_type, is_nullable
            FROM information_schema.columns 
            WHERE table_name = 'restaurants' 
            ORDER BY ordinal_position
        """)).fetchall()
        
        print('\nCurrent restaurants table columns:')
        for col_name, data_type, is_nullable in result:
            print(f'  {col_name}: {data_type} (nullable: {is_nullable})')

if __name__ == '__main__':
    check_restaurants_schema()