Skip to content

Commit a21e094

Browse files
committed
Readd NOT NULL to new preference string
Signed-off-by: Gary Kim <gary@garykim.dev>
1 parent 564132f commit a21e094

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

models/migrations/v93.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import "github.com/go-xorm/xorm"
99
func addEmailNotificationEnabledToUser(x *xorm.Engine) error {
1010
// Issue see models/user.go
1111
type User struct {
12-
EmailNotificationsPreference string `xorm:"DEFAULT 'enabled'"`
12+
EmailNotificationsPreference string `xorm:"NOT NULL DEFAULT 'enabled'"`
1313
}
1414

1515
return x.Sync2(new(User))

models/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ type User struct {
9696
// Email is the primary email address (to be used for communication)
9797
Email string `xorm:"NOT NULL"`
9898
KeepEmailPrivate bool
99-
EmailNotificationsPreference string `xorm:"DEFAULT 'enabled'"`
99+
EmailNotificationsPreference string `xorm:"NOT NULL DEFAULT 'enabled'"`
100100
Passwd string `xorm:"NOT NULL"`
101101
PasswdHashAlgo string `xorm:"NOT NULL DEFAULT 'pbkdf2'"`
102102

0 commit comments

Comments
 (0)