Working with composite primary key in django project with legacy database

后端 未结 2 1248
执念已碎
执念已碎 2021-01-12 22:00

I have a legacy database, where some table contains composite primary key. The model I get by running manage.py inspectdb command looks like this.



        
2条回答
  •  遥遥无期
    2021-01-12 22:15

    You must Delete managed = False command from the model to be able to edit your table

提交回复
热议问题