-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Add support for sqlite database #8444
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
Conversation
Suggestions:
Some code can be taken from here: |
Also It would be great to be able to turn off the default database entirely - or better yet, to introduce a set of well-defined asynchronous persistence interfaces. That way, anyone building on ComfyUI (or simply wanting to swap in a different database backend) could implement those interfaces and have their chosen storage engine used transparently. |
Is there an issue with the current ORM impl. that would prevent this? Adding a custom abstraction layer feels pretty impractical to maintain, at present. |
As far as I know - no, you are absolutely right about not having to build an additional layer over SqlAlchemy. I probably didn't describe it quite accurately. By backends I meant SqlAlchemy |
|
||
def get_db_path(): | ||
url = args.database_url | ||
if url.startswith("sqlite:///"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the ^sqlite:///
check? I assume the ORM will have an appropriate fit if it's misconfigured.
@bigcat88 Hadn't noticed this - disregard my earlier comment!
(Automated Bot Message) CI Tests are running, you can view the results at https://ci.comfy.org/?branch=8444%2Fmerge |
n.b. Merged as-is to unblock work, and flagged for follow-up / testing regarding allowing other DBs. |
Cut down version of #8432, to just contain the database setup code.