coderedcorp / coderedcorp/coderedcms

Missing migration for CoderedPage.index_order_by default/choices

Abierto
#709 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
765
Forks
154
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

## 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?

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Start with coderedcms/models/page_models.py and migration 0044, then run `pipenv run python manage.py makemigrations --check --dry-run` to inspect the reported model/migration mismatch. Done means the migration captures the `CoderedPage.index_order_by` default and choices, and the check no longer generates a migration.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
django, python
Área
backend, database
Tipo de issue
Error
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
58/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.