Georepublic / pg_scheduleserv

RESTful API Server for scheduling VRP tasks using vrpRouting and VROOM, written in Go. Demo Application
GNU Affero General Public License v3.0
8 stars 0 forks source link

Supporting PostgreSQL SCHEMA #5

Open dkastl opened 3 years ago

dkastl commented 3 years ago

As far as I understand this would all be done in the public schema, right?

I find it very comfortable to work in a different schema. Would it be possible to enable this? Or would it cause a lot of extra effort?

krashish8 commented 3 years ago

Yes, no issues in enabling this. I will just need to prepend the schema name (e.g. scheduler schema) in all the queries.

dkastl commented 3 years ago

SCHEMA can be sometimes a bit annoying. But it can make database operations also very comfortable, like backups and updates. Could the schema be defined in some environment variables like the database connection?

krashish8 commented 3 years ago

Yes, the schema can be defined in environment variables (will need to check a bit). I think it will need a separate env variable, not sure if it can be done in the database connection variable itself.

dkastl commented 3 years ago

We could have app.env.example and put app.env on .gitignore to be able to use custom settings without accidentally committing to the repository.

krashish8 commented 3 years ago

Yes, I will do this. There are more such changes required... the application is not complete yet. :)

Apart from completing the coding part, I will need to add the CI/CD (GitHub Actions), documentation (or swagger schema), README, etc. I will also add the unit tests to ensure that everything works fine. Also, later on, we will need to think of whether we should deploy this API and which service to use for this.

Feel free to suggest anything else that is required!

dkastl commented 3 years ago

Of course. Don't think that you need to fix my issues within a few hours ... I just write them down before I forget about them. And I try to tag them as question if I actually just want to propose them for discussion.