(refs #578)Add migration for repositories which have removed parent or origin repository.

This commit is contained in:
Naoki Takezoe
2014-12-22 01:32:15 +09:00
parent 238dedb6df
commit 39fec57f72
3 changed files with 104 additions and 38 deletions

View File

@@ -137,7 +137,7 @@ trait RepositoryService { self: AccountService =>
WebHooks .filter(_.byRepository(userName, repositoryName)).delete
Repositories .filter(_.byRepository(userName, repositoryName)).delete
// Update ORIGINAL_USER_NAME and ORIGINAL_REPOSITORY_NAME
// Update ORIGIN_USER_NAME and ORIGIN_REPOSITORY_NAME
Repositories
.filter { x => (x.originUserName === userName.bind) && (x.originRepositoryName === repositoryName.bind) }
.map { x => (x.userName, x.repositoryName) }