Closed Sathyajoe closed 9 months ago
Tried with latest repo pulled on 15th Feb'24 at 11AM.
Hi @Sathyajoe ,
Did you run the migration commands?
python manage.py makemigrations
python manage.py migrate
With Regards, Team Horilla
Yes, both are worked fine without an issue, successfully completed the process of migrations & migrate.
Log FYI : $ sudo python3 manage.py makemigrations [sudo] password for sathya: No changes detected sathya@Ubuntu:~/Downloads/horilla-install-ubuntu.sh/horilla$ sudo 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, onboarding, payroll, pms, recruitment, sessions Running migrations: No migrations to apply.
Are you working with the test database provided or a new blank database?
Currently using new blank dayabase
Okay. So can try by removing all the existing migration files and running the makemigrations and migrate command again.
I've cleared migrations & retried still the issue is same. used following commands to clear the migrations :
Can you make sure that this commands remove the migrations files in all the apps, as this is not working for me?
I've cleared migrations & retried still the issue is same. used following commands to clear the migrations :
1. find . -path "_/migrations/_.py" -not -name "**init**.py" -delete^C 2. find . -path "_/migrations/_.pyc" -delete
Try these command and check.
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
No luck !! tried to configure in windows 11 as well, getting same error !!
Sorry for the inconvenience caused. Can we start from the scratch? Please use the following steps and try the installation again.
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
Please let us know if this works, or else we can arrange a meeting with our team to assist you with the installation.
With Regards, Team Horilla
Awesome, its working pretty well.
Thanks a lot team for your constant support since morning.
Thanks, Happy to hear that. Do let us know if you face any concerns. We are closing this issue as it is resolved.
With Regards, Team Horilla
Bug Report
Find the attached log for reference, OS Version : Ubuntu 22.04.3 LTS
Command : python3 manage.py createhorillauser Enter first name: Test2 Enter last name: User2 Enter username: admin2 Enter password: admin2 Enter email: Enter phone number: Traceback (most recent call last): File "/home/sathya/.local/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute return self.cursor.execute(sql, params) File "/home/sathya/.local/lib/python3.10/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute return super().execute(query, params) sqlite3.OperationalError: no such table: employee_bonuspoint
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/home/sathya/Downloads/horilla-install-ubuntu.sh/horilla/base/management/commands/createhorillauser.py", line 47, in handle employee.save() File "/home/sathya/Downloads/horilla-install-ubuntu.sh/horilla/employee/models.py", line 358, in save super().save(*args, kwargs) File "/home/sathya/.local/lib/python3.10/site-packages/django/db/models/base.py", line 814, in save self.save_base( File "/home/sathya/.local/lib/python3.10/site-packages/django/db/models/base.py", line 892, in save_base post_save.send( File "/home/sathya/.local/lib/python3.10/site-packages/django/dispatch/dispatcher.py", line 176, in send return [ File "/home/sathya/.local/lib/python3.10/site-packages/django/dispatch/dispatcher.py", line 177, in
(receiver, receiver(signal=self, sender=sender, named))
File "/home/sathya/Downloads/horilla-install-ubuntu.sh/horilla/employee/models.py", line 677, in bonus_post_save
if not BonusPoint.objects.filter(employee_id__id=instance.id).exists():
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/models/query.py", line 1241, in exists
return self.query.has_results(using=self.db)
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/models/sql/query.py", line 598, in has_results
return compiler.has_results()
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1530, in has_results
return bool(self.execute_sql(SINGLE))
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1562, in execute_sql
cursor.execute(sql, params)
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/backends/utils.py", line 102, in execute
return super().execute(sql, params)
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
with self.db.wrap_database_errors:
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/utils.py", line 91, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute
return super().execute(query, params)
django.db.utils.OperationalError: no such table: employee_bonuspoint
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/sathya/.local/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute return self.cursor.execute(sql, params) File "/home/sathya/.local/lib/python3.10/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute return super().execute(query, params) sqlite3.OperationalError: no such column: base_rotatingworktypeassign.created_at
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/home/sathya/Downloads/horilla-install-ubuntu.sh/horilla/manage.py", line 22, in
main()
File "/home/sathya/Downloads/horilla-install-ubuntu.sh/horilla/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/home/sathya/.local/lib/python3.10/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
utility.execute()
File "/home/sathya/.local/lib/python3.10/site-packages/django/core/management/init.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/sathya/.local/lib/python3.10/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, *cmd_options)
File "/home/sathya/.local/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(args, **options)
File "/home/sathya/Downloads/horilla-install-ubuntu.sh/horilla/base/management/commands/createhorillauser.py", line 59, in handle
user.delete()
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/models/base.py", line 1131, in delete
collector.collect([self], keep_parents=keep_parents)
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/models/deletion.py", line 350, in collect
on_delete(self, field, sub_objs, self.using)
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/models/deletion.py", line 23, in CASCADE
collector.collect(
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/models/deletion.py", line 348, in collect
if getattr(on_delete, "lazy_sub_objs", False) or sub_objs:
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/models/query.py", line 412, in bool
self._fetch_all()
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/models/query.py", line 1881, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/models/query.py", line 91, in iter
results = compiler.execute_sql(
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1562, in execute_sql
cursor.execute(sql, params)
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/backends/utils.py", line 102, in execute
return super().execute(sql, params)
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
with self.db.wrap_database_errors:
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/utils.py", line 91, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
File "/home/sathya/.local/lib/python3.10/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute
return super().execute(query, params)
django.db.utils.OperationalError: no such column: base_rotatingworktypeassign.created_at