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

[BUG] Missing migrations for cmsplugin_ptr #62

Open
1 of 2 tasks
jribbens opened this issue Sep 26, 2023 · 1 comment
Open
1 of 2 tasks

[BUG] Missing migrations for cmsplugin_ptr #62

jribbens opened this issue Sep 26, 2023 · 1 comment

Comments

@jribbens
Copy link

Description

djangocms 3.11.4 is missing migrations for plugins.

Steps to reproduce

  1. Install e.g. djangocms 3.11.0 with django 4.0
  2. Create a new project and add django cms to the INSTALLED_APPS as per the instructions
  3. Install a plugin, e.g. djangocms_column, djangocms_googlemap, djangocms_picture, djangocms_style, or djangocms_video
  4. Run ./manage.py migrate
  5. Run pip install -U django-cms
  6. Run ./manage.py makemigrations and notice that there are missing migrations for every plugin

Expected behaviour

Migrations are part of the packages.

Actual behaviour

Migrations are missing.

Screenshots

Example missing migration for cmsplugin_style:

Migrations for 'djangocms_style': 
  env/lib/python3.10/site-packages/djangocms_style/migrations/0008_alter_style_cmsplugin_ptr.py
    - Alter field cmsplugin_ptr on style                                        
Full migrations file '0008_alter_style_cmsplugin_ptr.py':                       
# Generated by Django 4.2.5 on 2023-09-26 12:31                                 
                                                                                
from django.db import migrations, models                                        
import django.db.models.deletion                                                
                                                                                
                                                                                
class Migration(migrations.Migration):                                          
                                                                                
    dependencies = [                                                            
        ('cms', '0022_auto_20180620_1551'),                                     
        ('djangocms_style', '0007_style_template'),                             
    ]                                                                           
                                                                                
    operations = [
        migrations.AlterField(
            model_name='style',
            name='cmsplugin_ptr',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.cmsplugin'),
        ),
    ]

Do you want to help fix this issue?

  • Yes, I want to help fix this issue and I will join #workgroup-pr-review on Slack to confirm with the community that a PR is welcome.
  • No, I only want to report the issue.
@fsbraun
Copy link
Sponsor Member

fsbraun commented Oct 5, 2023

@jribbens would you be interested in adding support for Django 4+ to djangocms-style? This would require updating test requirements, adjusting Django version-specific code ( largely automated with Django-upgrade) and updating readme and setup.py?

@marksweb marksweb transferred this issue from django-cms/django-cms Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants