diff --git a/alembic/__pycache__/env.cpython-311.pyc b/alembic/__pycache__/env.cpython-311.pyc new file mode 100644 index 0000000..bc57e8a Binary files /dev/null and b/alembic/__pycache__/env.cpython-311.pyc differ diff --git a/alembic/versions/__pycache__/b28d5d6a1a82_create_todo_table.cpython-311.pyc b/alembic/versions/__pycache__/b28d5d6a1a82_create_todo_table.cpython-311.pyc new file mode 100644 index 0000000..e59ce03 Binary files /dev/null and b/alembic/versions/__pycache__/b28d5d6a1a82_create_todo_table.cpython-311.pyc differ diff --git a/app/__pycache__/__init__.cpython-311.pyc b/app/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..1e1c2e6 Binary files /dev/null and b/app/__pycache__/__init__.cpython-311.pyc differ diff --git a/app/core/__pycache__/__init__.cpython-311.pyc b/app/core/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..725c26e Binary files /dev/null and b/app/core/__pycache__/__init__.cpython-311.pyc differ diff --git a/app/core/__pycache__/config.cpython-311.pyc b/app/core/__pycache__/config.cpython-311.pyc new file mode 100644 index 0000000..91bb553 Binary files /dev/null and b/app/core/__pycache__/config.cpython-311.pyc differ diff --git a/app/db/__pycache__/__init__.cpython-311.pyc b/app/db/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..da81790 Binary files /dev/null and b/app/db/__pycache__/__init__.cpython-311.pyc differ diff --git a/app/db/__pycache__/base.cpython-311.pyc b/app/db/__pycache__/base.cpython-311.pyc new file mode 100644 index 0000000..2475da9 Binary files /dev/null and b/app/db/__pycache__/base.cpython-311.pyc differ diff --git a/app/db/__pycache__/session.cpython-311.pyc b/app/db/__pycache__/session.cpython-311.pyc new file mode 100644 index 0000000..f0aacbf Binary files /dev/null and b/app/db/__pycache__/session.cpython-311.pyc differ diff --git a/app/models/__pycache__/__init__.cpython-311.pyc b/app/models/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..72d804a Binary files /dev/null and b/app/models/__pycache__/__init__.cpython-311.pyc differ diff --git a/app/models/__pycache__/todo.cpython-311.pyc b/app/models/__pycache__/todo.cpython-311.pyc new file mode 100644 index 0000000..cd81fe5 Binary files /dev/null and b/app/models/__pycache__/todo.cpython-311.pyc differ diff --git a/test_db.py b/test_db.py new file mode 100644 index 0000000..17f2f46 --- /dev/null +++ b/test_db.py @@ -0,0 +1,25 @@ +from app.db.session import SessionLocal +from app.models.todo import Todo + +# Create a database session +db = SessionLocal() + +try: + # Create a test todo + test_todo = Todo( + title="Test Todo", + description="This is a test todo created to verify database operations", + ) + db.add(test_todo) + db.commit() + db.refresh(test_todo) + print(f"Created Todo with ID: {test_todo.id}") + + # Query and list all todos + todos = db.query(Todo).all() + print(f"Found {len(todos)} todos in the database:") + for todo in todos: + print(f" - {todo.id}: {todo.title} (Completed: {todo.completed})") + +finally: + db.close() \ No newline at end of file