Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating tables in the sqlite database #1909

Open
Amartyanov1974 opened this issue Mar 1, 2025 · 2 comments · May be fixed by #1917
Open

Error creating tables in the sqlite database #1909

Amartyanov1974 opened this issue Mar 1, 2025 · 2 comments · May be fixed by #1917

Comments

@Amartyanov1974
Copy link

Starting with tortoise 0.22, the documentation examples do not work correctly: tables are not created in the sqlite database.
Tested with Sanic and FastAPI examples.
Error: tortoise.exceptions.OperationalError: no such table: users.
After manually creating the table, the code works correctly.
Tested on tortoise ORM versions 0.24, 0.23, 0.22, 0.21.

@henadzit
Copy link
Contributor

henadzit commented Mar 4, 2025

@Amartyanov1974 please provide a reproducible example.

@waketzheng waketzheng linked a pull request Mar 4, 2025 that will close this issue
7 tasks
@waketzheng
Copy link
Contributor

I tried latest version of fastapi in ubuntu/macos/windows, the fastapi example does not raise OperationalError.

Note: if you are not running unittest, do not use the memory sqlite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants