1. 程式人生 > >解決“ raise errorclass, errorvalue django.db.utils.IntegrityError: (1048, "Column 'st_id' cannot be n”

解決“ raise errorclass, errorvalue django.db.utils.IntegrityError: (1048, "Column 'st_id' cannot be n”

一、問題描述

在建立超級使用者,新增完基本的資訊之後,就報錯顯示如下: 

raise errorclass, errorvalue
django.db.utils.IntegrityError: (1048, "Column 'st_id' cannot be null")

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 二、分析問題

三、解決問題

嘗試1------

 問題還是一模一樣,並不能解決。

 

嘗試2-----------------------------------

 三、問題解決

把相關的資料庫刪除,再更改models,然後遷移資料庫。