Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
4.14k stars 554 forks source link

Database support and migration to Postgres #1198

Closed HLneoh closed 4 years ago

HLneoh commented 4 years ago

The default database for Mesh Central is NeDB. Plus, it supports the migration from NeDB to MongoDB. Here are the questions:

  1. Is it possible to migrate from NeDB to Postgres?
  2. If yes, how much effort would be approximately needed?
Ylianst commented 4 years ago

Currently, only NeDB (default), MongoDB, MariaDB, MySQL are supported. It's not currently possible to migrate to Postgres. Would need to add Postgres support first which would be a big effort.

HLneoh commented 4 years ago

Thanks for your reply. Could you give a few tips on adding Postgres support? e.g. other than db.js, what files should I modify?

ryanblenis commented 4 years ago

@HLneoh, if you're doing it right, no other files should need to be modified other than db.js if you're simply adding support for another database (plus probably an npm include for the node driver for said database)

Ylianst commented 4 years ago

Oh, if you are a developer and can help with adding PostgreSQL support, that would be wonderful! Yes, the only file that needs changing is db.js that is here: https://github.com/Ylianst/MeshCentral. If you make it work, I would really like to include it as part of the MeshCentral distribution.