Skip to content

Commit

Permalink
Merge pull request #5 from containerum/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
MargoTuleninova authored Aug 9, 2018
2 parents 208cdc9 + 3db5d57 commit 60e09f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/db/postgres/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func DBConnect(pgConnStr string, migrationsPath string) (db.DB, error) {

func (pgdb *pgDB) migrateUp(path string) (*migrate.Migrate, error) {
pgdb.log.Infof("Running migrations")
instance, err := migdrv.WithInstance(pgdb.conn.DB, &migdrv.Config{})
instance, err := migdrv.WithInstance(pgdb.conn.DB, &migdrv.Config{MigrationsTable: "migrations_um"})
if err != nil {
return nil, err
}
Expand Down
7 changes: 2 additions & 5 deletions pkg/server/impl/user_changes.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,8 @@ func (u *serverImpl) CompletelyDeleteUser(ctx context.Context, userID string) er
return cherry.ErrUnableDeleteUser()
}

add, rngErr := utils.SecureRandomString(6)
if rngErr != nil {
return rngErr
}
user.Login = user.Login + "-" + add
randStr, _ := utils.SecureRandomString(6)
user.Login = user.Login + "-" + randStr
err = u.svc.DB.Transactional(ctx, func(ctx context.Context, tx db.DB) error {
return tx.UpdateUser(ctx, user)
})
Expand Down

0 comments on commit 60e09f0

Please sign in to comment.