Skip to content
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

build: Upgrading django-simple-history. It has some breaking changes. #1787

Merged
merged 3 commits into from
Jun 28, 2023

Conversation

awais786
Copy link
Contributor

@awais786 awais786 commented Oct 13, 2022

https://django-simple-history.readthedocs.io/en/latest/#section-1

Upgrading the package.

jazzband/django-simple-history#862 ( this pr shows the get_latest_by usage )

@@ -201,6 +201,7 @@ class User(AbstractUser):

full_name = models.CharField(_("Full Name"), max_length=255, blank=True, null=True)
lms_user_id = models.IntegerField(null=True, db_index=True)
first_name = models.CharField(_("first name"), max_length=30, blank=True)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In django32 they have increased the first_name character length. But credentials is using 30 characters max length. This line avoids the new migration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise make migrations command brings new migration with 150 characters and it will put load on db while making this change on prod.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there another dependency that is limiting the first_name to 30 characters? Is that related to django_social? (I'm looking into an error with the length of first_name)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have added the migration to extend the length of first_name, so this should not be needed now.

@awais786 awais786 marked this pull request as ready for review October 13, 2022 12:07
@justinhynes
Copy link
Contributor

Hi @awais786 -- unfortunately the PR has a few conflicts. Is this still actively being worked on? Would you be able to fix these? or can we close this PR? Thanks!

@awais786
Copy link
Contributor Author

awais786 commented Dec 1, 2022

@justinhynes I will fix these conflicts soon.

@hurtstotouchfire
Copy link
Member

FYI we have a bug that may or may not be related to this, and we are investigating that bug and then we will come back around to looking at this.

@hurtstotouchfire hurtstotouchfire requested review from hurtstotouchfire and removed request for Tj-Tracy and MaxFrank13 January 17, 2023 19:19
@justinhynes
Copy link
Contributor

@awais786 Just checking in on this. There are still a number of conflicts, should we keep this PR open?

@awais786
Copy link
Contributor Author

@awais786 Just checking in on this. There are still a number of conflicts, should we keep this PR open?

I will look into this in coming week.

@@ -559,3 +559,6 @@
# Plugin Django Apps
INSTALLED_APPS.extend(get_plugin_apps(PROJECT_TYPE))
add_plugins(__name__, PROJECT_TYPE, SettingsType.BASE)

# disable indexing on history_date
SIMPLE_HISTORY_DATE_INDEX = False
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@awais786
Copy link
Contributor Author

@justinhynes sorry for late response and fixing this PR. This pr looks fine now. you can merge it.

After this deployment we can remove the pin and upgrade to latest version to get django4 support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants