New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug 1490727: Add stripe customer id to MDN user #5059

merged 2 commits into from Oct 31, 2018


None yet
2 participants

michal-macioszczyk commented Oct 31, 2018

As a MDN developer I want users and stripe customers to be linked so that managing user and customer becomes easier.

  • MDN user was updated with new optional field called stripe_customer_id

  • create two separate migrations one for timezone and second one for stripe_customer_id


Thanks @michal-macioszczyk, I like that you split the migration into two commits. This works locally, where I ran the migration and then returned to master, which doesn't know about the new field. Let's get this to production before we merge the code that uses it.

@@ -188,6 +188,10 @@ class User(AbstractUser):
stripe_customer_id = models.CharField(

This comment has been minimized.


jwhitlock Oct 31, 2018


Migrations are rare enough that I need to think through this, and when I think, I do it in a GitHub comment.

The deployment is done in Jenkins:

// Start a rolling update of the Kuma-based deployments.
// Monitor the rollout until it has completed.
// Record the rollout in external services like New-Relic.

  1. The database is migrated while the old code is running. Django doesn't use *, but instead asks for each column by name. The old code won't load the new column.
  2. The new code is rolled out. Users have a chance to get the new or old code. If the new code loads a user, it will include the (blank) customer ID.
  3. The new code is rolled out, everything works.

@jwhitlock jwhitlock merged commit b6c2f84 into mozilla:master Oct 31, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
security/snyk - package.json (mdn) No new, high severity issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment