Missing migration for CoderedPage.index_order_by default/choices

Đang mở
#709 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
58/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
django, python
Lĩnh vực
backend, database

Hướng nghiên cứu

Bắt đầu với coderedcms/models/page_models.py và migration 0044, sau đó chạy pipenv run python manage.py makemigrations --check --dry-run để kiểm tra sự không khớp giữa model và migration được báo cáo. Hoàn thành khi migration bao gồm giá trị mặc định và các lựa chọn của CoderedPage.index_order_by, đồng thời bước kiểm tra không còn tạo migration nữa.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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?

Ngôn ngữ chính
Python
Star
765
Fork
154
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của coderedcorp/coderedcms

Tất cả issue của coderedcorp/coderedcms

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.