BobbyWibowo/lolisafe

[FEATURE REQUEST] Use PostgreSQL as database

ranile opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
This application currently uses sqlite for its database which is not very scalable and is limiting in many regards.

Describe the solution you'd like
Switch (or allow an option) to use PostgreSQL as database as it is a better database in every way.

Additional context
There are cases where servers running lolisafe already have Postgres for one reason or another. Being able to use the same database for lolisafe would be a welcome improvement.

Theoretically shouldn't be too complicated considering we're already using Knex.js for SQL abstraction.

Thing such as boolean values (which SQLite doesn't have) shouldn't really require conversion for Postgre, as even though we're using integer for those, we properly check by the exact integer values, iirc at least.
Though I guess there will be some performance advantage that won't be benefited from by not using the specialized types? Dunno.
Anyway, I wouldn't be doing this, so if someone else is willing to do it then feel free.

Reminder: Pitu is already using Postgre in upstream's rewritten version, even though it's still WIP, with SQLite still as a supported alternative.