1
0
Fork 0
forked from forgejo/forgejo

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
This commit is contained in:
Lunny Xiao 2021-06-08 11:52:51 +08:00 committed by GitHub
parent 21cde5c439
commit b9d611e917
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 594 additions and 237 deletions

View file

@ -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