coderedcorp / coderedcorp/coderedcms
Missing migration for CoderedPage.index_order_by default/choices
- 主要言語
- Python
- スター
- 765
- フォーク
- 154
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
## 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?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
coderedcms/models/page_models.py と migration 0044 から始め、次に `pipenv run python manage.py makemigrations --check --dry-run` を実行して、報告されたモデルと migration の不一致を調査します。`CoderedPage.index_order_by` のデフォルト値と choices が migration に反映され、チェックで migration が生成されなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- django, python
- 領域
- backend, database
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 58/100