🗑️ chore: remove unused database and routing scripts; update cached Python bytecode files in __pycache__ directories
This commit is contained in:
38
utils/check_db.py
Normal file
38
utils/check_db.py
Normal file
@@ -0,0 +1,38 @@
|
||||
import sqlite3
|
||||
|
||||
def check_mindmap_nodes():
|
||||
try:
|
||||
conn = sqlite3.connect('database/systades.db')
|
||||
cursor = conn.cursor()
|
||||
|
||||
# Check if the table exists
|
||||
cursor.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='mind_map_node';")
|
||||
table_exists = cursor.fetchone()
|
||||
|
||||
if not table_exists:
|
||||
print("Die Tabelle 'mind_map_node' existiert nicht!")
|
||||
return
|
||||
|
||||
# Check for the "Wissen" node
|
||||
cursor.execute("SELECT * FROM mind_map_node WHERE name = 'Wissen';")
|
||||
wissen_node = cursor.fetchone()
|
||||
|
||||
if wissen_node:
|
||||
print(f"'Wissen'-Knoten gefunden: {wissen_node}")
|
||||
else:
|
||||
print("'Wissen'-Knoten NICHT gefunden!")
|
||||
|
||||
# Get all nodes
|
||||
cursor.execute("SELECT id, name FROM mind_map_node LIMIT 10;")
|
||||
nodes = cursor.fetchall()
|
||||
|
||||
print(f"\nVorhandene Knoten (max. 10):")
|
||||
for node in nodes:
|
||||
print(f" - {node}")
|
||||
|
||||
conn.close()
|
||||
except Exception as e:
|
||||
print(f"Fehler: {e}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
check_mindmap_nodes()
|
||||
Reference in New Issue
Block a user