Django migrate : doesn't create tables

前端 未结 10 1710
独厮守ぢ
独厮守ぢ 2021-01-31 18:03

After some errors, I dropped my database, deleted all my migration files (I left init.py). Now, when I run

python migrate.py makemigrations   /         


        
10条回答
  •  生来不讨喜
    2021-01-31 18:57

    From Django docs, Options.managed: "If False, no database table creation or deletion operations will be performed for this model."

    And I see you have

       options={
            'db_table': 'tblclients',
            'managed': False,
        },
    

    Try setting managed=True in the model.

提交回复
热议问题