horilla-opensource / horilla

Horilla is a free and open source HR software.
https://www.horilla.com/
GNU Lesser General Public License v2.1
121 stars 73 forks source link

How to configure a Fresh DB #221

Open wasimkhan2024 opened 1 month ago

wasimkhan2024 commented 1 month ago

I've installed the horilla software successfully using its installation guide on its website but it has demo data. how can i replace it with fresh DB and its configuration according to my requirements.

horilla-opensource commented 1 month ago

Hi @wasimkhan2024 , You can change the database name inside the horilla/settings.py and run the migrations command to start with a fresh database. Change the name of the database inside the settings.py file to your wish. After that run the makemigrations and migrate command. Inside settings.py you'll find a line for database configuration containing the name _"TestDBHorilla.sqlite3". Just change the name to anything you wish followed by .sqlite3 as file format. (For example: "Production_DB.sqlite3"). Run the migrations command.

python3 manage.py makemigrations
python3 manage.py migrate

If you are going for a production level installation, we suggest you to use postgresql database instead of sqlite3.

With Regards, Team Horilla

wasimkhan2024 commented 1 week ago

Thank you for your guidance and support. as per your suggestion of shifting to Postgresql database, is it possible for you to guide me about this shifting with complete details like what would be the suggested DB name with extension. I've followed the steps mentioned in https://www.horilla.com/docs/database-setup/ but getting error mesg.

wasimkhan2024 commented 1 week ago

getting error: Execution of job "block_unblock_disciplinary (trigger: interval[0:00:10], next run at: 2024-07-18 17:10:25 PKT)" skipped: maximum number of running instances reached (1)

horilla-opensource commented 4 days ago

Hi @wasimkhan2024 , Can you share with the details of the settings.py file containing the database configuration data?