Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Postgres 中有一个名为 user 的表,它是一个自定义模型。然后我切换到默认的 Django User 类,但由于名称重叠而出现了问题。我怎样才能擦除前一张表,或者擦除整个数据库(仍在测试中,所以没什么大不了的)重新开始?
最简单的方法是直接在数据库提示符中执行DROP TABLE语句,记住 Django 模型就像数据库中的任何其他表一样
DROP TABLE
删除数据库--帮助
在终端运行这个