Skip to content

Sqlite3 compatibility

Bruno Visse requested to merge sqlite into dev

Main content

In order to add support for a local sqlite3 database, I remade the database module (src/database/database.js). Depending of the configuration in the env variables, the module will choose between mariadb or sqlite. If a sqlite file path is defined in the configuration, it will choose the sqlite3 DBMS. Otherwise the mariadb server will be chosen.

The main objective was to make every module calling the database (/src/api/*.js), to be completely independent of the chosen database. The api modules are way more clearer without any reference to mariadb and/or sqlite3.

Almost all of the work is in the file src/database/database.js.

Also present in the merge request

  • The README was updated accordingly.
  • package.json was updated with the next deploy version 0.2.0. The dependencies packages were updated.
  • Added comments in api_upload.
  • Not implemented upload token feature has been commented until further notice.

Merge request reports