Problem
I dropped some table related to an app. and again tried this command
$ python manage.py syncdb
It shows error like
django.db.utils.ProgrammingError: (1146, "Table 'someapp.feed' doesn't exist")
Solution
- drop tables
- comment-out the model in model.py,
- if django version >= 1.7:
$ python manage.py makemigrations
$ python manage.py migrate --fake
else
$ python manage.py schemamigration someapp --auto
$ python manage.py migrate someapp --fake
- comment-in your model in models.py
- if django version >= 1.7:
$ python manage.py makemigrations
$ python manage.py migrate
else
$ python manage.py schemamigration someapp --auto
$ python manage.py migrate someapp
Reference
- Django : Table doesn’t exist - https://stackoverflow.com/questions/27583744/django-table-doesnt-exis
FEATURED TAGS
algorithm
algorithmproblem
architecturalpattern
architecture
aws
c#
cachesystem
codis
compile
concurrentcontrol
database
dataformat
datastructure
debug
design
designpattern
distributedsystem
django
docker
domain
engineering
freebsd
git
golang
grafana
hackintosh
hadoop
hardware
hexo
http
hugo
ios
iot
java
javaee
javascript
kafka
kubernetes
linux
linuxcommand
linuxio
lock
macos
markdown
microservices
mysql
nas
network
networkprogramming
nginx
node.js
npm
oop
openwrt
operatingsystem
padavan
performance
programming
prometheus
protobuf
python
redis
router
security
shell
software testing
spring
sql
systemdesign
truenas
ubuntu
vmware
vpn
windows
wmware
wordpress
xml
zookeeper