我克隆了一个django项目。 我已经安装了所有依赖项,还更改了dbname,用户名和密码。 当我运行此命令 python manage.py migration 或 python manage.py makemigrations 时,出现以下错误。
imsaiful@code:~/Desktop/abdul_bhai/fuelark_app-master$ python manage.py makemigrations
Traceback (most recent call last):
File "/home/imsaiful/Desktop/abdul_bhai/myvenv/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "/home/imsaiful/Desktop/abdul_bhai/myvenv/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py", line 298, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such table: notification_ID
The above exception was the direct cause of the following exception:
File "/home/imsaiful/Desktop/abdul_bhai/myvenv/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "/home/imsaiful/Desktop/abdul_bhai/myvenv/lib/python3.6/site-packages/django/db/utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/imsaiful/Desktop/abdul_bhai/myvenv/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "/home/imsaiful/Desktop/abdul_bhai/myvenv/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py", line 298, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table: notification_ID
我以前工作过django。运行迁移命令后,总是在数据库内部创建新表。我该怎么办?