Update Content model to enforce status choices and add migration for status field changes
- Introduced STATUS_CHOICES in the Content model to restrict the status field to 'draft', 'review', and 'published'. - Created a new migration to reflect the updated status choices without altering existing data. - Removed 'completed' status from the frontend status color mapping for consistency.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# Generated manually to update status field choices
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('writer', '0005_move_content_fields_to_content'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
# No database changes needed - just updating Python-level choices
|
||||
# Tasks status: queued, completed
|
||||
# Content status: draft, review, published
|
||||
# Existing data will remain valid
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user