Cleanarr icon indicating copy to clipboard operation
Cleanarr copied to clipboard

add database interface for wider db support

Open robertlestak opened this issue 7 months ago • 0 comments

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 avatar Jul 23 '24 05:07 robertlestak