LoginSignup
0
0

More than 3 years have passed since last update.

programmingError line 1: select count(*) as "__count" from "chat_chat"的なやつを治す方法

Posted at

superuserでadminにログインし、モデルの一つのChatを開こうとしたら起こった。

記事を漁ると、migrationとかpyhacheあたりを削除して、もう一回

>>> python manage.py makemigrations
>>> python manage.py migrate

をすれば治るらしい。

ただ治らない。

1.appもう一個作る。
もう一個、

>>> python manage.py startapp chats

でアプリを作って全部コピペ。
今回はこれで解決。

2.新しいデータベースを作る。

試してないけどこれが一番早いかも。

3.今あるデータベースを初期化してmakemigrations

userまた作んのめんどいから避けたけど、1番もそこそこ時間かかるので次はこれを試したい。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0