Here is the reviewed patch with the suggestions of Ashesh.
Disclaimer: We added a new patch file with the changes
I have made some more changes to the patch.
- 'with app.app_context(..)' statement was not required in the 'web/pgadmin/__init__.py' as we're already doing that in the do_upgrade function.
- We also need to create other directories (i.e. sessions, storage, directory containing the log-file) during the setup/running the application (if not exists).
- Added proper check in the pgAdmin4.wsgi file (if configuration file exists, or not)