Spaces:
Running
Running
| import psycopg2 | |
| DATABASE_URL = "postgresql://postgres.egkydqberhebzkqtltic:Isaac%23105*may%40@aws-1-us-east-1.pooler.supabase.com:5432/postgres" | |
| def check_schema(): | |
| conn = psycopg2.connect(DATABASE_URL) | |
| cur = conn.cursor() | |
| cur.execute("SELECT column_name FROM information_schema.columns WHERE table_name='devices';") | |
| cols = [r[0] for r in cur.fetchall()] | |
| print("Columnas en devices:", cols) | |
| cur.close() | |
| conn.close() | |
| if __name__ == "__main__": | |
| check_schema() | |