first push
This commit is contained in:
14
backend/check_db.py
Normal file
14
backend/check_db.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import pymysql
|
||||
|
||||
conn = pymysql.connect(host='localhost', user='root', password='root', database='myapp')
|
||||
cursor = conn.cursor()
|
||||
cursor.execute('DESCRIBE image')
|
||||
rows = cursor.fetchall()
|
||||
|
||||
print("Current 'image' table structure:")
|
||||
print("-" * 60)
|
||||
for row in rows:
|
||||
print(f"Field: {row[0]:<15} Type: {row[1]:<15} Null: {row[2]}")
|
||||
print("-" * 60)
|
||||
|
||||
conn.close()
|
||||
Reference in New Issue
Block a user