Files
image-db-sync-monitor/legacy/schema_check.py
2026-07-07 15:54:55 +05:30

21 lines
553 B
Python

import pymysql
try:
connection = pymysql.connect(
host='140.245.211.174',
user='appuser',
password='Seekright@123',
database='Maple_Highways',
port=3306,
cursorclass=pymysql.cursors.DictCursor
)
with connection.cursor() as cursor:
cursor.execute("DESCRIBE tbl_site_anomaly")
result = cursor.fetchall()
for row in result:
print(f"{row['Field']} - {row['Type']}")
finally:
if 'connection' in locals() and connection.open:
connection.close()