aboutsummaryrefslogtreecommitdiffstats
path: root/models/migrations/migrations.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-06-08 11:52:51 +0800
committerGitHub <noreply@github.com>2021-06-08 11:52:51 +0800
commitb9d611e917d9bd10e0d8be8fc61e057d5936993c (patch)
treef70159ff5731da4b34312acfff8443dc3be61337 /models/migrations/migrations.go
parent21cde5c439676d4aaa15dfc79505f364cc849ec0 (diff)
downloadgitea-b9d611e917d9bd10e0d8be8fc61e057d5936993c.tar.gz
gitea-b9d611e917d9bd10e0d8be8fc61e057d5936993c.zip
Always store primary email address into email_address table and also the state (#15956)
* Always store primary email address into email_address table and also the state * Add lower_email to not convert email to lower as what's added * Fix fixture * Fix tests * Use BeforeInsert to save lower email * Fix v180 migration * fix tests * Fix test * Remove wrong submited codes * Fix test * Fix test * Fix test * Add test for v181 migration * remove change user's email to lower * Revert change on user's email column * Fix lower email * Fix test * Fix test
Diffstat (limited to 'models/migrations/migrations.go')
-rw-r--r--models/migrations/migrations.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go
index d440722c96..df1bac4a13 100644
--- a/models/migrations/migrations.go
+++ b/models/migrations/migrations.go
@@ -311,6 +311,8 @@ var migrations = []Migration{
NewMigration("Convert avatar url to text", convertAvatarURLToText),
// v180 -> v181
NewMigration("Delete credentials from past migrations", deleteMigrationCredentials),
+ // v181 -> v182
+ NewMigration("Always save primary email on email address table", addPrimaryEmail2EmailAddress),
}
// GetCurrentDBVersion returns the current db version