Skip to content

Conversation

@whoisearth
Copy link

Fix pulled from Django 4.2 release notes here -

https://docs.djangoproject.com/en/5.1/releases/4.2/#deprecated-features-4-2

Migrating existing index_together should be handled as a migration. For example:

class Author(models.Model):
    rank = models.IntegerField()
    name = models.CharField(max_length=30)

    class Meta:
        index_together = [["rank", "name"]]

Should become:

class Author(models.Model):
    rank = models.IntegerField()
    name = models.CharField(max_length=30)

    class Meta:
        indexes = [models.Index(fields=["rank", "name"])]

Django 5.1 ... index_together deprecated.
Django 5.1 .... index_together deprecated
@whoisearth whoisearth mentioned this pull request Jan 1, 2025
@raisoblast
Copy link

Waiting for this pull request to be merged soon

@blissdev
Copy link

blissdev commented May 9, 2025

Any updates on when this could be merged? @llazzaro

@cgossy
Copy link

cgossy commented May 14, 2025

Seems that @llazzaro is not responding. Or has anybody else infomation about new releases, maybe @jdufresne ?

@llazzaro
Copy link
Owner

I will try to take a look today

@cgossy
Copy link

cgossy commented Jun 16, 2025

I will try to take a look today

@llazzaro
long gone today :-)

any updates?

I know that there is a django5_scheduler package in pypi available, but this is pinned to django5 which is not really good when you have to support django4 and django5 LTS versions

@cgossy
Copy link

cgossy commented Jul 3, 2025

Hi @llazzaro , just another reminder.

What is the status. I know there is already a package available for django5 https://github.com/NCIAdmin/django5-scheduler, but this package sticks to django5 which is not working if you have to support django 4.2 LTS and django5.2 LTS.

The changes in this pull request will support 4.2 and 5.2 (already tested), I would prefer to use the package from you (@llazzaro ) instead of depeding on forks (by the way the django5-scheduler maintainer is also inkognito mode and does not provide any contact options)

@robertpro
Copy link
Contributor

This is actually missing the migration, you can add it from here:

# Generated by Django 4.2.19 on 2025-08-21 18:48

from django.db import migrations


class Migration(migrations.Migration):

    dependencies = [
        ('schedule', '0014_use_autofields_for_pk'),
    ]

    operations = [
        migrations.RenameIndex(
            model_name='calendarrelation',
            new_name='schedule_ca_content_cddadb_idx',
            old_fields=('content_type', 'object_id'),
        ),
        migrations.RenameIndex(
            model_name='event',
            new_name='schedule_ev_start_a258cb_idx',
            old_fields=('start', 'end'),
        ),
        migrations.RenameIndex(
            model_name='eventrelation',
            new_name='schedule_ev_content_6ceecb_idx',
            old_fields=('content_type', 'object_id'),
        ),
        migrations.RenameIndex(
            model_name='occurrence',
            new_name='schedule_oc_start_76a2f8_idx',
            old_fields=('start', 'end'),
        ),
    ]

@Guthers
Copy link

Guthers commented Dec 29, 2025

Thought I'd try my luck pinging @llazzaro and @jdufresne before I try and replace the dependency, or fork it. This PR seems small enough that coupled with the migration above it should hopefully be a tick and flick.

Although for others on this thread I am going to try https://github.com/NCIAdmin/django5-scheduler first

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

Successfully merging this pull request may close these issues.

7 participants