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

add database interface for wider db support #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robertlestak
Copy link

@robertlestak robertlestak commented Jul 23, 2024

this PR adds a database interface to enable the use of a remote DB as opposed to the embedded tinydb.

this change is backwards compatible and opt-in. existing installations will continue to work as expected, and new installs will default to use embedded tinydb.

setting DATABASE_URL env var will switch to SQLAlchemy interface, which has much wider DB support. I've only tested with postgres, and I would imagine support for other DBs would require adding those drivers in the requirements.txt, but i've left that as-is for now.

this does not handle any data migrations, so if you have an existing TinyDB install and switch to SqlAlchemy backend, it will start fresh.

@robertlestak robertlestak force-pushed the database branch 2 times, most recently from f93fd1a to b90cc03 Compare July 23, 2024 21:36
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 this pull request may close these issues.

1 participant