diff --git a/pkg/models/user.go b/pkg/models/user.go index 10ec03791a3..81ed0123c1e 100644 --- a/pkg/models/user.go +++ b/pkg/models/user.go @@ -11,15 +11,17 @@ var ( ) type User struct { - Id int64 - Version int - Email string - Name string - Login string - Password string - Salt string - Rands string - Company string + Id int64 + Version int + Email string + Name string + Login string + Password string + Salt string + Rands string + Company string + EmailVerified bool + Theme string IsAdmin bool AccountId int64 diff --git a/pkg/services/sqlstore/migrations.go b/pkg/services/sqlstore/migrations.go index 3f7530d3c70..3c9c27a0918 100644 --- a/pkg/services/sqlstore/migrations.go +++ b/pkg/services/sqlstore/migrations.go @@ -47,6 +47,15 @@ func addUserMigrations(mg *Migrator) { &Column{Name: "updated", Type: DB_DateTime, Nullable: false}, )) + mg.AddMigration("Add email_verified flag", new(AddColumnMigration). + Table("user").Column(&Column{Name: "email_verified", Type: DB_Bool, Nullable: true})) + + mg.AddMigration("Add email_verified flag", new(AddColumnMigration). + Table("user").Column(&Column{Name: "email_verified", Type: DB_Bool, Nullable: true})) + + mg.AddMigration("Add user.theme column", new(AddColumnMigration). + Table("user").Column(&Column{Name: "theme", Type: DB_Varchar, Nullable: true, Length: 20})) + //------- user table indexes ------------------ mg.AddMigration("add unique index user.login", new(AddIndexMigration). Table("user").Columns("login").Unique())