-
Notifications
You must be signed in to change notification settings - Fork 61
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
fix: added missing migrations #120
base: master
Are you sure you want to change the base?
Conversation
Removed dependency on non-existent cms migration
this is a duplicate with #118 will try to improve this |
drop dependency to the first cms migration as it's sufficient and provides the best backward compatibility
Changed migration dependency to the first migration of CMS newer Django treat migrations for OneToOneField with a slight difference (couldn't find particular version where this change occurs) It seems sensible to update migrations to the newer standard.
|
What is the reason for that? |
It seems to me, that it brings more independence in version of DjangoCMS as the latest migrations may not be present in older versions. |
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('cms', '__first__'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather this be latest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
latest migration from develop branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed code to use latest migration found in the develop branch of django-cms repo.
now the code is the same with #118
The original idea was to accommodate cases where users update djangocms-picture, but may keep django-cms in older version than does not includes the latest migration. I've chosen the first migration, because that's where cmsplugin_ptr
is created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @marksweb referred to '__latest__'
instead of '__first__'
. This would allow you to keep cms outdated (for whatever reason ;-) )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking back at this, I think it needs to be __first__
because if if's latest and we release a new migration, the applied migration here would depend on a migration yet to be applied and that causes an error.
DOCS: update README (django-cms#121)
djangocms_picture/migrations/0012_alter_picture_cmsplugin_ptr.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Mark Walker <[email protected]>
Description
Adding missing migrations for newer Django (couldn't find particular version, but migrations for OneToOneField are generated with a slight difference).
Related resources
Checklist
master
Slack to find a “pr review buddy” who is going to review my pull request.