Show More
@@ -39,7 +39,7 b' def fixups(models, _SESSION):' | |||||
39 | notify('Creating repository states') |
|
39 | notify('Creating repository states') | |
40 | _state = models.Repository.STATE_CREATED |
|
40 | _state = models.Repository.STATE_CREATED | |
41 | for repo in models.Repository.get_all(): |
|
41 | for repo in models.Repository.get_all(): | |
42 |
|
|
42 | log.info('setting repo %s state to "%s"', repo, _state) | |
43 | repo.repo_state = _state |
|
43 | repo.repo_state = _state | |
44 | _SESSION().add(repo) |
|
44 | _SESSION().add(repo) | |
45 | _SESSION().commit() |
|
45 | _SESSION().commit() |
@@ -39,7 +39,7 b' def fixups(models, _SESSION):' | |||||
39 | notify('Fixing auth tokens roles') |
|
39 | notify('Fixing auth tokens roles') | |
40 | _role = models.UserApiKeys.ROLE_ALL |
|
40 | _role = models.UserApiKeys.ROLE_ALL | |
41 | for token in models.UserApiKeys.get_all(): |
|
41 | for token in models.UserApiKeys.get_all(): | |
42 |
|
|
42 | log.info('setting key %s role to "%s"', token, _role) | |
43 | token.role = _role |
|
43 | token.role = _role | |
44 | _SESSION().add(token) |
|
44 | _SESSION().add(token) | |
45 | _SESSION().commit() |
|
45 | _SESSION().commit() |
@@ -43,5 +43,5 b' def fixups(models, _SESSION):' | |||||
43 |
|
43 | |||
44 | res = PermissionModel(_SESSION()).create_default_user_permissions( |
|
44 | res = PermissionModel(_SESSION()).create_default_user_permissions( | |
45 | models.User.DEFAULT_USER) |
|
45 | models.User.DEFAULT_USER) | |
46 | print res |
|
46 | log.info('created default permission %s', res) | |
47 | _SESSION().commit() |
|
47 | _SESSION().commit() |
@@ -28,7 +28,7 b' def downgrade(migrate_engine):' | |||||
28 | def fixups(models, Session): |
|
28 | def fixups(models, Session): | |
29 | for repo in models.Repository.get_all(): |
|
29 | for repo in models.Repository.get_all(): | |
30 | if repo.clone_uri: |
|
30 | if repo.clone_uri: | |
31 |
|
|
31 | log.info('Encrypting clone uri in repo %s', repo) | |
32 | flag_modified(repo, 'clone_uri') |
|
32 | flag_modified(repo, 'clone_uri') | |
33 | Session().add(repo) |
|
33 | Session().add(repo) | |
34 |
|
34 |
General Comments 0
You need to be logged in to leave comments.
Login now