Search code examples
databasesqlitegopocketbase

Can the SQLite Database in Pocketbase be modified to your own liking?


Pocketbase is cunrretly my BaaS solution and due to its flexability I can change/modify the code using Go. I was wondering if I can change the defualt SQLite database and change to something like a MongoDB/Redis database.

I have dug through the files and found nothing but yes/no answers and not a explaination.


Solution

  • Sorry mate not at this moment it seems.

    Pocketbase states this at the of the FAQ page:

    6. Can I use database X?

    PocketBase uses embedded SQLite (in WAL mode) and there are no plans for supporting other databases.

    Additionally, in this issue:

    Currently only SQLite is supported. Support for other SQL databases may be added in the future but for now it is a very low priority.

    As for to why, here is the reason:

    The main reason for now to even consider adding support for other SQL databases is to support cloud providers with ephemeral storage, not because of scaling (there are other things beside the database that prevents PocketBase to scale horizontally and this is by design).

    There are no plans for Redis, since to maximize the performance, we rely heavily on the SQL syntax (even the API rules are converted to SQL statements).

    Futher discussions here and here.