Min and max functions out of scope
Traceback (most recent call last):
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/db/backends/utils.py", line 86, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.UndefinedTable: relation "chronos_timeperiod" does not exist
LINE 1: ...s_timeperiod"."time_end") AS "time_end__max" FROM "chronos_t...
^
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
utility.execute()
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/core/management/__init__.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/core/management/base.py", line 328, in run_from_argv
self.execute(*args, **cmd_options)
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/core/management/base.py", line 366, in execute
self.check()
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/core/management/base.py", line 395, in check
include_deployment_checks=include_deployment_checks,
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/core/management/commands/migrate.py", line 64, in _run_checks
issues.extend(super()._run_checks(**kwargs))
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/core/management/base.py", line 382, in _run_checks
return checks.run_checks(**kwargs)
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/core/checks/registry.py", line 72, in run_checks
new_errors = check(app_configs=app_configs)
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/core/checks/urls.py", line 13, in check_url_config
return check_resolver(resolver)
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/core/checks/urls.py", line 23, in check_resolver
return check_method()
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/urls/resolvers.py", line 407, in check
for pattern in self.url_patterns:
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/utils/functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/urls/resolvers.py", line 588, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/utils/functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/urls/resolvers.py", line 581, in urlconf_module
return import_module(self.urlconf_name)
File "/srv/aleksis/venv/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/src/AlekSIS/aleksis/core/urls.py", line 67, in <module>
urlpatterns.append(path("app/%s/" % app_config.label, include("%s.urls" % app_config.name)))
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/urls/conf.py", line 34, in include
urlconf_module = import_module(urlconf_module)
File "/srv/aleksis/venv/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/src/AlekSIS/apps/official/AlekSIS-App-Chronos/aleksis/apps/chronos/urls.py", line 3, in <module>
from . import views
File "/usr/src/AlekSIS/apps/official/AlekSIS-App-Chronos/aleksis/apps/chronos/views.py", line 20, in <module>
from .util.min_max import (
File "/usr/src/AlekSIS/apps/official/AlekSIS-App-Chronos/aleksis/apps/chronos/util/min_max.py", line 7, in <module>
Min("period"), Max("period"), Min("weekday"), Max("weekday"), Min("time_start"), Max("time_end")
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/db/models/query.py", line 384, in aggregate
return query.get_aggregation(self.db, kwargs)
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/db/models/sql/query.py", line 502, in get_aggregation
result = compiler.execute_sql(SINGLE)
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1144, in execute_sql
cursor.execute(sql, params)
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/db/backends/utils.py", line 100, in execute
return super().execute(sql, params)
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/db/backends/utils.py", line 68, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/db/backends/utils.py", line 86, in _execute
return self.cursor.execute(sql, params)
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/srv/aleksis/venv/lib/python3.7/site-packages/django/db/backends/utils.py", line 86, in _execute
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: relation "chronos_timeperiod" does not exist
LINE 1: ...s_timeperiod"."time_end") AS "time_end__max" FROM "chronos_t...
^
This happens a after fresh install on debian sid
with postgresql 12.1-2
Edited by Nik | Klampfradler