Add migration for creator field - #41
Conversation
|
Deployed |
|
Deployed |
| `Organization with id already exists: ${err.toString()}` | ||
| return User.fetchByGithubId(job.creator.githubId) | ||
| .catch(NotFoundError, (err) => { | ||
| // User might have not been created yet. Retry until user gets created |
There was a problem hiding this comment.
if you're doing this, then we should probably add retry limit if the user never gets created...
There was a problem hiding this comment.
Maybe also give it like a 1000ms of time between iterations?
There was a problem hiding this comment.
Ponos does that automatically though.
There was a problem hiding this comment.
isn't that a variable you have to set?
| { err: err } | ||
| ) | ||
| }) | ||
| .catch(ForeignKeyError, err => { |
There was a problem hiding this comment.
um, when did this worker get added?
Does anything call it?
I feel like we need to change it ASAP
There was a problem hiding this comment.
This worker was here from the beginning. I just fixed this to fix tests. Do we just want to delete these worker? Or maybe leave them around for when we change this to actually just handle isActive?
There was a problem hiding this comment.
Let's delete. We can always go back in history and get it
There was a problem hiding this comment.
Deleted that and the organization.delete one
| * @param {Object} opts - Bookshelf query options. A transaction can be passed here | ||
| * @resolves {Organization} organization - Organization model instance | ||
| * @param {String} githubId - Github ID for new organization | ||
| * @param {User} creator - User model instance |
There was a problem hiding this comment.
User who created this organization
|
Result of migration: |
|
Orgs with no users in gamma: |
|
Orgs with no users in Gamma: |
|
Final Result: |
* 'master' of github.com:CodeNow/big-poppa: 0.12.0 Add migration for creator field (#41)
What this PR does
creatorfield to organizationcreatorfield during org creationDependencies
Reviewers
Deployment
Rollback steps
sshintoapp-servicessleep infinity)npm run rollbackTests