部署项目时发生迁移错误

2024-10-02 06:27:01 发布

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

嗨,我的朋友们这是我的网站http://qhse-erp.com/ 我犯了这个错误 enter image description here 而且 当django在cpanel上迁移我的模块时,我遇到了问题

我使用phpPgAdmin-postgresql9.2.24(我不能使用更多更新,因为这是共享主机,我不能使用根)

django 2.2.6

当我使用migrate-fake时,我遇到了以下错误,错误消失了,但是站点无法恢复

这是下面的错误

Running migrations:
  Applying authtoken.0002_auto_20160226_1747...Traceback (most recent call last):
  File "/home/aeraeg/virtualenv/python/3.7/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
psycopg2.errors.SyntaxError: syntax error at or near "WITH ORDINALITY"
LINE 6:                     FROM unnest(c.conkey) WITH ORDINALITY co...

enter image description here


Tags: 模块djangocomhttpexecuteerp网站错误
1条回答
网友
1楼 · 发布于 2024-10-02 06:27:01

先生,你可以试试这个

  1. 首先删除以前的迁移文件

  2. 然后通过以下语句和

    python manage.py makemigrationspython manage.py migrate

请告诉我它是否适合你

相关问题 更多 >

    热门问题