diff --git a/bcs-services/bcs-bscp/cmd/data-service/db-migration/migrations/20240909174526_modify_app.go b/bcs-services/bcs-bscp/cmd/data-service/db-migration/migrations/20240909174526_modify_app.go index 0340b3130d..26f56c7d69 100644 --- a/bcs-services/bcs-bscp/cmd/data-service/db-migration/migrations/20240909174526_modify_app.go +++ b/bcs-services/bcs-bscp/cmd/data-service/db-migration/migrations/20240909174526_modify_app.go @@ -35,7 +35,7 @@ func init() { func mig20240909174526Up(tx *gorm.DB) error { // Applications : applications type Applications struct { - LastConsumedTime time.Time `gorm:"column:last_consumed_time;type:datetime(6)"` + LastConsumedTime time.Time `gorm:"column:last_consumed_time;type:datetime(6);default:NULL"` } // Applications add new column @@ -53,7 +53,7 @@ func mig20240909174526Down(tx *gorm.DB) error { // Applications : applications type Applications struct { - LastConsumedTime time.Time `gorm:"column:last_consumed_time;type:datetime(6)"` + LastConsumedTime time.Time `gorm:"column:last_consumed_time;type:datetime(6);default:NULL"` } // Applications drop column