2020
09-25
09-25
django修改models重建数据库的操作
第二次修改models.py以后再次pythonmanage.pymakemigrations提示如下Youaretryingtoaddanon-nullablefield'address'toxc_userswithoutadefault;wecan'tdothat(thedatabaseneedssomethingtopopulateexistingrows).Pleaseselectafix:1)Provideaone-offdefaultnow(willbesetonallexistingrows)2)Qu于是删除数据库表,继续报相同的错误makemigration需要指定名称,然后migrate才能识别...
继续阅读 >