"feat: Update tailwind CSS and improve test database functionality"
This commit is contained in:
parent
f927048570
commit
2243f1e47c
Binary file not shown.
2
backend/app/static/css/tailwind.min.css
vendored
2
backend/app/static/css/tailwind.min.css
vendored
File diff suppressed because one or more lines are too long
47
backend/app/test_database_fix.py
Normal file
47
backend/app/test_database_fix.py
Normal file
@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Test-Script für die Datenbank-Reparatur
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Pfad zur App hinzufügen
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
def test_database_fix():
|
||||
"""Testet ob die Datenbank-Reparatur erfolgreich war."""
|
||||
try:
|
||||
from models import get_cached_session, User, Printer, Job
|
||||
|
||||
print("=== DATENBANK-TEST NACH REPARATUR ===")
|
||||
|
||||
with get_cached_session() as session:
|
||||
# Test User-Query (das war das ursprüngliche Problem)
|
||||
users = session.query(User).limit(5).all()
|
||||
print(f"✓ User-Abfrage erfolgreich - {len(users)} Benutzer gefunden")
|
||||
|
||||
# Details des ersten Users anzeigen (falls vorhanden)
|
||||
if users:
|
||||
user = users[0]
|
||||
print(f"✓ Test-User: {user.username} ({user.email})")
|
||||
print(f"✓ updated_at-Feld: {user.updated_at}")
|
||||
|
||||
# Test Printer-Query
|
||||
printers = session.query(Printer).limit(5).all()
|
||||
print(f"✓ Printer-Abfrage erfolgreich - {len(printers)} Drucker gefunden")
|
||||
|
||||
# Test Job-Query
|
||||
jobs = session.query(Job).limit(5).all()
|
||||
print(f"✓ Job-Abfrage erfolgreich - {len(jobs)} Jobs gefunden")
|
||||
|
||||
print("\n🎉 ALLE DATENBANK-TESTS ERFOLGREICH!")
|
||||
print("Die Anwendung sollte jetzt ohne Fehler starten.")
|
||||
return True
|
||||
|
||||
except Exception as e:
|
||||
print(f"\n❌ DATENBANK-TEST FEHLGESCHLAGEN: {str(e)}")
|
||||
return False
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_database_fix()
|
Loading…
x
Reference in New Issue
Block a user