How to change the database from sqlite3 to postgresql

i want to change the database of mayan edms from sqlite3 to postgresql

1 Like

Some extra information is needed to answer properly:
Do you want to keep the data in sqlite3 or start from scratch?
Do you use the docker?

no I am not using Docker
and yes i want to keep the data in sqlite3 also

|In your config.yml the following should be present, where the ENGINE probably has django.db.backend.sqlite currently:

DATABASES:
default:
ENGINE: django.db.backends.postgresql
HOST: ***
NAME: ***
PASSWORD: ***
USER: ***

I guess starting a new virtual environment with the same mayan-edms version with the above database settings will create the proper postgresql DB.
Then you will need to migrate your data from sqlite3 to PostgreSQL somehow. Never done that though.

Maybe there are script someone here already created to do the job?

1 Like

There is no config.yml file there is a base.py file is present

1 Like

No … not in the source code. The config file is in your media folder:

.../media/config.yml

Before continuing you of course made some backups right?

1 Like

Hoping someone sees this but there is no config.yml, just an autogenerated config_backup.yml

sorry, could you tell me how can I access to the source code of mayan edms, as you show in your image? please?

You can clone the github repository and you have to run it locally Then you can see the modification you have done

mayan Official git-hub repository: Mayan EDMS / Mayan EDMS · GitLab

Then you can follow the official page to install it in your local system:

1 Like