It's not a duplicate, I've already seen other posts with the same title, but the problem doesn't occur in the same moment as in these posts and answers doesn't work.
After basic setup on new Ubuntu 20.04 LTS Machine i cloned my repository, created virtual environment, installed dependencies, installed mysql, edited my.cnf file with database informations and everything was working fine to the moment i did python3 manage.py migrate
.
I have error (1146, "Table 'todochat_data.app_server' doesn't exist")
. Well it obviously doesn't exist because my database is empty, but I don't know how to fix it. I've already done these basic project setups dozens of times, but I've never seen this problem.
todochat_data.app_server model
[client]
database = todochat_data
user = todochat_user
password = database_user_password
default-character-set = utf8
What I tried:
- python manage.py migrate --database dataset
- python manage.py migrate --fake
- commenting out app in installed_apps
- python manage.py migrate --fake app zero
- migrate --fake-initial
History of commands:
- 9 git clone https://github.com/n3rsti/ToDoChat.git
- 10 cd ToDoChat/
- 11 virtualenv -p python3 venv/
- 12 source venv/bin/activate
- 13 ls
- 14 pip3 install -r requirements.txt
- 15 nano todochat/todochat/settings.py
- 16 sudo mysql -u root
- 17 sudo apt install mysql-server
- 18 sudo mysql -u root # I created todochat_user here using this template
CREATE USER 'djangouser'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
- 19 sudo nano /etc/mysql/my.cnf
- 20 sudo systemctl daemon-reload
- 21 sudo systemctl restart mysql
- 22 cd todochat/
- 23 python manage.py migrate