Skip to content

Commit

Permalink
Readd NOT NULL to new preference string
Browse files Browse the repository at this point in the history
Signed-off-by: Gary Kim <gary@garykim.dev>
  • Loading branch information
gary-kim committed Aug 19, 2019
1 parent 564132f commit a21e094
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion models/migrations/v93.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import "github.com/go-xorm/xorm"
func addEmailNotificationEnabledToUser(x *xorm.Engine) error {
// Issue see models/user.go
type User struct {
EmailNotificationsPreference string `xorm:"DEFAULT 'enabled'"`
EmailNotificationsPreference string `xorm:"NOT NULL DEFAULT 'enabled'"`
}

return x.Sync2(new(User))
Expand Down
2 changes: 1 addition & 1 deletion models/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ type User struct {
// Email is the primary email address (to be used for communication)
Email string `xorm:"NOT NULL"`
KeepEmailPrivate bool
EmailNotificationsPreference string `xorm:"DEFAULT 'enabled'"`
EmailNotificationsPreference string `xorm:"NOT NULL DEFAULT 'enabled'"`
Passwd string `xorm:"NOT NULL"`
PasswdHashAlgo string `xorm:"NOT NULL DEFAULT 'pbkdf2'"`

Expand Down

0 comments on commit a21e094

Please sign in to comment.