corrected migration

This commit is contained in:
Tim-Niclas Oelschläger 2024-02-22 18:37:23 +01:00
parent 618000a673
commit 5507c07e91
No known key found for this signature in database

View File

@ -17,12 +17,9 @@ import (
func AddActionsVisibility(x *xorm.Engine) error {
// This migration maybe rerun so that we should check if it has been run
keepActivityPrivateExits, err := x.Dialect().IsColumnExist(x.DB(), context.Background(), "user", "keep_activity_private")
if err != nil {
if err != nil || !keepActivityPrivateExits {
return err
}
if keepActivityPrivateExits {
return nil
}
sess := x.NewSession()
defer sess.Close()