-
Notifications
You must be signed in to change notification settings - Fork 28
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
sqlalchemy.exc.InvalideRequestError when calling version_manager.init(Base) in minimal FastAPI app #61
Comments
Not sure if this helps or is unrelated but I initialized my own versioning manager and set a random I thought my issue was strictly an issue with async but this error appears to be pointing to something else but I'm not sure anymore why this error is occuring. DB log
Python
|
I'm looking for a solution which may be documented and I haven't seen it yet or I am finding some bug when trying to initialize the versioning_manager or related to #39
My simplified app example I'm working with is as follows and is mostly a copy of the FastAPI documentation's SQL integration guide found here with some modifications for async database access via SQLAlchemy 1.4 based on this
What I notice about the error is the error does not come directly from the
.init(Base)
call but when theBase.metadata.create_all
is called the error is raised. The error does not occur and I do not see any Activity table built or schemas in the database if I moveinit_versioning_manager
aftercreate_db_and_tables
.I would greatly appreciate help with this as I'm no longer sure what is wrong or if this is functionality that is not yet supported with async SQLAlchemy 1.4 or something else entirely. I also would love to use this project since I can not use SQLAlchemy-Continuum anylonger with SLQA1.4 since I'm now using the core api and not the orm so the events used by continuum do not work with the core api and this project seemed like my solution.
sqlalchemy.exc.InvalidRequestError
main.py
docker-compose.yml
scripts/init.sh
app/crud.py
app/database.py
app/main.py
app/models.py
app/schemas.py
The text was updated successfully, but these errors were encountered: