diff --git a/models/migrations/v77.go b/models/migrations/v77.go
index 12e745664..c564d4cf5 100644
--- a/models/migrations/v77.go
+++ b/models/migrations/v77.go
@@ -10,7 +10,7 @@ import (
 
 func addUserDefaultTheme(x *xorm.Engine) error {
 	type User struct {
-		Theme string `xorm:"VARCHAR(30)"`
+		Theme string `xorm:"VARCHAR(30) NOT NULL DEFAULT ''"`
 	}
 
 	return x.Sync2(new(User))