horilla-opensource / horilla

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

Recreate the missing tables - Exit process not working #161

Closed BhuviTheDataGuy closed 6 months ago

BhuviTheDataGuy commented 6 months ago

After the installation, I navigated to Offboarding --> Exit process Then I could see the create button to create the process. I created a sample process and then I deleted it. After that when I click on Exit process Im not able to access it.

horilla-error

Is there any way that I can reimport the tables?

I tried with the migration command but not working.

root@ip-10-10-28-15:/opt/horilla# python3 manage.py makemigrations
No changes detected
root@ip-10-10-28-15:/opt/horilla# python3 manage.py migrate
Operations to perform:
  Apply all migrations: admin, asset, attendance, auth, base, contenttypes, django_apscheduler, employee, helpdesk, horilla_audit, horilla_documents, leave, notifications, offboarding, payroll, pms, recruitment, sessions
Running migrations:
  No migrations to apply.
root@ip-10-10-28-15:/opt/horilla#
horilla-opensource commented 6 months ago

Hi @BhuviTheDataGuy , This seems to be an issue with the migration associated with the onboarding module.(#160 ) Can you please confirm in the onboarding app, the migration folder is present?

With Regards, Team Horilla

BhuviTheDataGuy commented 6 months ago

I dont see the migration folder inside the onboarding folder. I cloned the latest commit only.

Let me know where can I check that.

root@ip-10-10-28-15:/opt/horilla/onboarding# ll
total 144
drwxr-xr-x  7 root root  4096 Apr 24 17:38 ./
drwxr-xr-x 25 root root  4096 Apr 25 05:09 ../
-rw-r--r--  1 root root     0 Apr 24 16:58 __init__.py
drwxr-xr-x  2 root root  4096 Apr 24 17:38 __pycache__/
-rw-r--r--  1 root root   352 Apr 24 16:58 admin.py
-rw-r--r--  1 root root   152 Apr 24 16:58 apps.py
-rw-r--r--  1 root root  4301 Apr 24 16:58 decorators.py
-rw-r--r--  1 root root  1464 Apr 24 16:58 filters.py
-rw-r--r--  1 root root 13510 Apr 24 16:58 forms.py
-rw-r--r--  1 root root  5688 Apr 24 16:58 models.py
drwxr-xr-x  5 root root  4096 Apr 24 16:58 static/
drwxr-xr-x  3 root root  4096 Apr 24 16:58 templates/
drwxr-xr-x  4 root root  4096 Apr 24 17:38 templatetags/
-rw-r--r--  1 root root    60 Apr 24 16:58 tests.py
drwxr-xr-x  2 root root  4096 Apr 24 16:58 threadings/
-rw-r--r--  1 root root  5018 Apr 24 16:58 urls.py
-rw-r--r--  1 root root 60341 Apr 24 16:58 views.py
root@ip-10-10-28-15:/opt/horilla/onboarding#
horilla-opensource commented 6 months ago

That's strange. The migration folder should automatically come up when we run the migration command. Can you try by creating a folder named migrations and an init (__init__.py) file inside it and run the makemigrations and migrate command again ? The structure will be onboarding/migrations/init.py

With Regards, Team Horilla

BhuviTheDataGuy commented 6 months ago

No luck :(

root@ip-10-10-28-15:/opt/horilla# mkdir onboarding/migrations
root@ip-10-10-28-15:/opt/horilla# touch onboarding/migrations/init.py
root@ip-10-10-28-15:/opt/horilla# python3 manage.py makemigrations
No changes detected
root@ip-10-10-28-15:/opt/horilla# python3 manage.py migrate
Operations to perform:
  Apply all migrations: admin, asset, attendance, auth, base, contenttypes, django_apscheduler, employee, helpdesk, horilla_audit, horilla_documents, leave, notifications, offboarding, payroll, pms, recruitment, sessions
Running migrations:
  No migrations to apply.
BhuviTheDataGuy commented 6 months ago

I think it is __init__.py

Now its fixed(both onboarding and offboarding)

horilla-opensource commented 6 months ago

Hi @BhuviTheDataGuy , My mistake, github automatically formatted the file name. I forgot to add the formatting in file name. The '__' was automatically formatted by github as bold characters. Sorry.

With Regards, Team Horilla

horilla-opensource commented 6 months ago

I think it is __init__.py

Now its fixed(both onboarding and offboarding)

Great 🔥😊.