melodix-api / check_schema.py
GitHub Action
deploy from github actions
440bac0
Raw
History Blame Contribute Delete
493 Bytes
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()