Update app labels for billing, writer, and planner models; fix foreign key references in automation migrations

- Set app labels for CreditTransaction and CreditUsageLog models to 'billing'.
- Updated app labels for Tasks, Content, and Images models to 'writer'.
- Changed foreign key references in automation migrations from 'account' to 'tenant' for consistency.
This commit is contained in:
IGNY8 VPS (Salman)
2025-11-16 22:37:16 +00:00
parent 1c2c9354ba
commit 1134285a12
4 changed files with 13 additions and 5 deletions

View File

@@ -29,7 +29,7 @@ class Tasks(SiteSectorBaseModel):
description = models.TextField(blank=True, null=True)
keywords = models.CharField(max_length=500, blank=True) # Comma-separated keywords (legacy)
cluster = models.ForeignKey(
'planning.Clusters',
'planner.Clusters',
on_delete=models.SET_NULL,
null=True,
blank=True,
@@ -37,13 +37,13 @@ class Tasks(SiteSectorBaseModel):
limit_choices_to={'sector': models.F('sector')}
)
keyword_objects = models.ManyToManyField(
'planning.Keywords',
'planner.Keywords',
blank=True,
related_name='tasks',
help_text="Individual keywords linked to this task"
)
idea = models.ForeignKey(
'planning.ContentIdeas',
'planner.ContentIdeas',
on_delete=models.SET_NULL,
null=True,
blank=True,
@@ -68,6 +68,7 @@ class Tasks(SiteSectorBaseModel):
updated_at = models.DateTimeField(auto_now=True)
class Meta:
app_label = 'writer'
db_table = 'igny8_tasks'
ordering = ['-created_at']
verbose_name = 'Task'
@@ -115,6 +116,7 @@ class Content(SiteSectorBaseModel):
updated_at = models.DateTimeField(auto_now=True)
class Meta:
app_label = 'writer'
db_table = 'igny8_content'
ordering = ['-generated_at']
verbose_name = 'Content'
@@ -172,6 +174,7 @@ class Images(SiteSectorBaseModel):
updated_at = models.DateTimeField(auto_now=True)
class Meta:
app_label = 'writer'
db_table = 'igny8_images'
ordering = ['content', 'position', '-created_at']
verbose_name = 'Image'