Skip to content

add database interface for wider db support#142

Open
robertlestak wants to merge 1 commit intose1exin:masterfrom
robertlestak:database
Open

add database interface for wider db support#142
robertlestak wants to merge 1 commit intose1exin:masterfrom
robertlestak:database

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