Initial commit
This commit is contained in:
20
legacy/schema_check.py
Normal file
20
legacy/schema_check.py
Normal file
@@ -0,0 +1,20 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user