first
This commit is contained in:
15
scripts/test_models.py
Normal file
15
scripts/test_models.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# test_models.py
|
||||
from app.database import SessionLocal
|
||||
from app.models.form import Form, Field, FormField
|
||||
|
||||
db = SessionLocal()
|
||||
|
||||
# Создаем тестовую форму
|
||||
form = Form(name="Test Form", description="Test")
|
||||
db.add(form)
|
||||
db.commit()
|
||||
|
||||
print(f"Created form with id: {form.id}")
|
||||
print("Database is working correctly!")
|
||||
|
||||
db.close()
|
||||
Reference in New Issue
Block a user