1
0
Fork 0
forked from forgejo/forgejo

Fix migration v141 (#14387)

* Fix mig 141

* Add Migration to fix it

* update null values to false first

* Alter Table if posible

* use dropTableColumns instead of recreateTable

* MySQL use Alter

* Postgres use Alter

* Update models/migrations/v167.go

* Apply suggestions from code review

* use 2x add col & 2x update & 2x drop col

* let sqlite be the only issue

* use recreate since it just WORKS
This commit is contained in:
6543 2021-01-28 23:58:33 +01:00 committed by GitHub
parent 3599d44399
commit 2ebe609d65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 109 additions and 1 deletions

View file

@ -281,6 +281,8 @@ var migrations = []Migration{
NewMigration("Where Password is Valid with Empty String delete it", recalculateUserEmptyPWD),
// v167 -> v168
NewMigration("Add user redirect", addUserRedirect),
// v168 -> v169
NewMigration("Recreate user table to fix default values", recreateUserTableToFixDefaultValues),
}
// GetCurrentDBVersion returns the current db version