coderedcorp / coderedcorp/coderedcms

Missing migration for CoderedPage.index_order_by default/choices

Ouverte
#709 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
765
Forks
154
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

## Summary
`coderedcms.models.page_models.CoderedPage.index_order_by` was updated (default/choices) in 6.0.0, but there is no migration for the change. Django reports a missing migration and `makemigrations --check --dry-run` generates one.

## Environment
- coderedcms 6.0.0
- Django 5.2.9
- Python 3.11.4

## Repro
```
pipenv run python manage.py makemigrations --check --dry-run
```

## Output
```
Migrations for 'coderedcms':
.venv/lib/python3.11/site-packages/coderedcms/migrations/0045_alter_coderedpage_index_order_by.py
~ Alter field index_order_by on coderedpage
```

## Notes
In `coderedcms/models/page_models.py`, `index_order_by` now includes an empty choice and uses `default = ""` with `blank=True`. The latest migration (0044) still reflects the old default and choices, so Django sees a model/migration mismatch.

Is it possible to include the missing `AlterField` migration in the next release?

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Commencez par coderedcms/models/page_models.py et la migration 0044, puis exécutez `pipenv run python manage.py makemigrations --check --dry-run` pour examiner l’incohérence modèle/migration signalée. C’est terminé lorsque la migration prend en compte la valeur par défaut et les choix de `CoderedPage.index_order_by`, et que la vérification ne génère plus de migration.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
django, python
Domaine
backend, database
Type d'issue
Bug
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
58/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.