Django.db.utils.ProgrammingError:必须是函数的所有者

2024-09-29 19:24:06 发布

您现在位置:Python中文网/ 问答频道 /正文

在部署过程中,我在“python”项目中遇到了一个错误管理.py迁移”:

  File "/Users/paus/project/api/ENV/lib/python2.7/site-packages/django/db/migrations/operations/special.py", line 117, in database_forwards
    self.code(from_state.render(), schema_editor)
  File "/Users/paus/project/api/sn/migrations/0012_user_full_name_full_text.py", line 8, in create_index
    schema_editor.execute('ALTER FUNCTION to_tsvector(text) IMMUTABLE')
  File "/Users/paus/project/api/ENV/lib/python2.7/site-packages/django/db/backends/schema.py", line 111, in execute
    cursor.execute(sql, params)
  File "/Users/paus/project/api/ENV/lib/python2.7/site-packages/django/db/backends/utils.py", line 81, in execute
    return super(CursorDebugWrapper, self).execute(sql, params)
  File "/Users/paus/project/api/ENV/lib/python2.7/site-packages/django/db/backends/utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
  File "/Users/paus/project/api/ENV/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/Users/paus/project/api/ENV/lib/python2.7/site-packages/django/db/backends/utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: must be owner of function to_tsvector

我该怎么处理?我们使用的Postgresql有什么关系吗?在哪里修理?在

谢谢你的建议!在


Tags: djangoinpyenvprojectapiexecutedb

热门问题