简体   繁体   中英

Recreate deleted django_migrations table

I am building a Django web application and I dropped the table django_migrations using psql command line and I want to recreate it.

To recreate django_migrations simply use

./manage.py migrate --fake

But please be careful with that as mentioned here:

If you break something, nobody can help you probably, because the migration system will not know the current state of the database more. Therefore do a backup, write notes, use a sandbox and work precisely.

Django migrate --fake and --fake-initial explained

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM