Feat/admin invite migration ENT- 11235#2492
Feat/admin invite migration ENT- 11235#2492sjasti-sonata-svg wants to merge 3 commits intoopenedx:masterfrom
Conversation
b4b89d2 to
88bd451
Compare
kiram15
left a comment
There was a problem hiding this comment.
I know when Troy did his talk about migrations he went into having to do some things in multiple PRs when you are dealing with different situations like dropping a column, but in this case, two PRs are not needed. Also, having the migration separate from your other PR could introduce a lot of problems if these PRs are merged in the incorrect order. I think it would be better to include these changes in this PR so you can avoid that.
| joined_date = models.DateTimeField( | ||
| null=True, | ||
| blank=True, | ||
| help_text="Timestamp when the user accepted the invite / joined." | ||
| ) |
There was a problem hiding this comment.
Similar to my comments in the other PR, joined_date would be redundant with created as this model inherits from TimeStampedModel.
| invited_date = models.DateTimeField( | ||
| null=True, | ||
| blank=True, | ||
| help_text="Timestamp when the user was invited." | ||
| ) |
There was a problem hiding this comment.
I recommend when you add a field you should also add the logic to populate the field in the same PR. for invited_date, you can simply add it here:
edx-enterprise/enterprise/models.py
Lines 1542 to 1546 in 88d14ef
enterprise_customer_user, __ = EnterpriseCustomerUser.objects.update_or_create(
enterprise_customer=self.enterprise_customer,
user_id=user.id,
defaults={
'active': True,
'invited_date': self.created,
},
)| blank=True, | ||
| on_delete=models.SET_NULL, | ||
| related_name='enterprise_users_invited', | ||
| help_text="Admin user who sent the invitation." |
There was a problem hiding this comment.
Nit:
| help_text="Admin user who sent the invitation." | |
| help_text="LMS user of admin who sent the invitation." |
|
|
||
| [6.5.8] - 2025-12-16 | ||
| --------------------- | ||
| * feat: Update admin table with new fields |
There was a problem hiding this comment.
comment is incorrect, as this PR does not update the admin table, it updates the enterprise customer user table.
Merge checklist:
requirements/*.txtfiles)base.inif needed in production but edx-platform doesn't install ittest-master.inif edx-platform pins it, with a matching versionmake upgrade && make requirementshave been run to regenerate requirementsmake statichas been run to update webpack bundling if any static content was updated./manage.py makemigrationshas been run./manage.py lms makemigrationsin the shell.Post merge:
(so basically once your build finishes, after maybe a minute you should see the new version in PyPi automatically (on refresh))
make upgradein edx-platform will look for the latest version in PyPi.