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

feat: migration fix #227

Merged
merged 3 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Change Log
Unreleased
~~~~~~~~~~

[3.0.1] - 2024-10-07
~~~~~~~~~~~~~~~~~~~~
* Upgrade django-simple-history and add migration to match the new version.

[3.0.0] - 2024-09-30
~~~~~~~~~~~~~~~~~~~~
* Add platform verification id field to the VerifiedName model
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ $(COMMON_CONSTRAINTS_TXT):

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: $(COMMON_CONSTRAINTS_TXT)
sed 's/django-simple-history==3.0.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
pip install -qr requirements/pip-tools.txt
# Make sure to compile files after any other files they include!
# need to do this to remove django-simple-history from common constraint.
Expand Down
2 changes: 1 addition & 1 deletion edx_name_affirmation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Django app housing name affirmation logic.
"""

__version__ = '3.0.0'
__version__ = '3.0.1'
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2.16 on 2024-10-07 15:25

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('edx_name_affirmation', '0009_add_verifiedname_platform_verification_id'),
]

operations = [
migrations.AlterModelOptions(
Copy link
Member

Choose a reason for hiding this comment

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

Out of curiosity, how are you doing a migration w/o a change to the model being present in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The model actually did change just not in our code. It was the base class for that model, TimeStampedModel that is now different.

name='historicalverifiedname',
options={'get_latest_by': ('history_date', 'history_id'), 'ordering': ('-history_date', '-history_id'), 'verbose_name': 'historical verified name', 'verbose_name_plural': 'historical verified names'},
),
]
4 changes: 2 additions & 2 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ django-model-utils==5.0.0
# via
# -r requirements/base.in
# edx-celeryutils
django-simple-history==3.0.0
django-simple-history==3.4.0
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.in
django-waffle==4.1.0
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Django<5.0
elasticsearch<7.14.0

# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected
django-simple-history==3.0.0


# Cause: https://github.com/openedx/event-tracking/pull/290
# event-tracking 2.4.1 upgrades to pymongo 4.4.0 which is not supported on edx-platform.
Expand Down
2 changes: 2 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@
# the next major release, ensure the installed version is within boundaries.
celery>=5.2.2,<6.0.0

django-simple-history==3.4.0

# Temporary to Support the python 3.11 Upgrade
backports.zoneinfo;python_version<"3.9" # Newer versions have zoneinfo available in the standard library
4 changes: 2 additions & 2 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ django-model-utils==5.0.0
# via
# -r requirements/base.in
# edx-celeryutils
django-simple-history==3.0.0
django-simple-history==3.4.0
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.in
django-waffle==4.1.0
# via
Expand Down
4 changes: 2 additions & 2 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ django-model-utils==5.0.0
# via
# -r requirements/base.txt
# edx-celeryutils
django-simple-history==3.0.0
django-simple-history==3.4.0
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.txt
django-waffle==4.1.0
# via
Expand Down
Loading