简体   繁体   中英

Django migrations- “no such table”

I recently tried to remove a few models for upvoting/downvoting posts by manually dropping the tables for the models in SQLite. This worked fine, except for now when I go to migrate after removing the models for the tables, Django raises a "no such table" error for the deleted tables. What can I do about this?

By deleting the tables manually, you've broken the sync between the db and the migrations. The best way to get out of this is probably to delete both your migrations and the db file itself, then rerun createmigrations.

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