# DB switches from Custom back to SQLite

**URL:** <https://support.prodi.gy/t/db-switches-from-custom-back-to-sqlite/6910>\
**Category:** Uncategorized\
**Created:** [November 20, 2023, 3:45pm UTC](https://support.prodi.gy/t/db-switches-from-custom-back-to-sqlite/6910 "2023-11-20T15:45:22Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![peter-axion](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/peter-axion/32/4202_2.png) [@peter-axion](https://support.prodi.gy/u/peter-axion)\
**Post date:** [November 20, 2023, 8:11pm UTC](https://support.prodi.gy/t/db-switches-from-custom-back-to-sqlite/6910/2 "2023-11-20T20:11:43Z")

</div>

I don't think that custom DBs work as documented across a couple of different dimensions, but for whoever comes after, I got it working by setting the default DB via prodigy.json and adding the DB to the databases registry using:

```python
from prodigy.util import registry
prodigy.databases.register("mongodb", func=AnnotationsDatabase())

```

This is a bit confusing because register is a decorator elsewhere but `func` here accepts a class instantiation.

prodigy.json now includes:

```json
{
  "db": "mongodb"
}

```

It now seems to work as expected.

[This post](https://support.prodi.gy/t/repeatingfeed-requires-a-database-connection-error-with-prodigy-1-10-4/3490/4) was critical information that I couldn't get to by looking at the prodigy source because `prodigy.util` is compiled now.

---

_[View the full topic](https://support.prodi.gy/t/db-switches-from-custom-back-to-sqlite/6910)._
