chore: add comment edit migrations (#2746)

This commit is contained in:
Nikhil
2025-03-19 14:03:28 +05:30
committed by GitHub
parent 568eaa1cf6
commit c6826ff4cc
5 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
# Generated by Django 4.2.18 on 2025-03-17 11:19
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('ee', '0027_projecttemplate_cover_asset_and_more'),
]
operations = [
migrations.AddField(
model_name='initiativecomment',
name='edited_at',
field=models.DateTimeField(blank=True, null=True),
),
migrations.AddField(
model_name='projectcomment',
name='edited_at',
field=models.DateTimeField(blank=True, null=True),
),
migrations.AddField(
model_name='projecttemplate',
name='template',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='project_templates', to='ee.template'),
),
migrations.AddField(
model_name='teamspacecomment',
name='edited_at',
field=models.DateTimeField(blank=True, null=True),
),
]

View File

@@ -184,6 +184,7 @@ class InitiativeComment(BaseModel):
)
external_source = models.CharField(max_length=255, null=True, blank=True)
external_id = models.CharField(max_length=255, blank=True, null=True)
edited_at = models.DateTimeField(null=True, blank=True)
def save(self, *args, **kwargs):
self.comment_stripped = (

View File

@@ -165,6 +165,7 @@ class ProjectComment(ProjectBaseModel):
)
external_source = models.CharField(max_length=255, null=True, blank=True)
external_id = models.CharField(max_length=255, blank=True, null=True)
edited_at = models.DateTimeField(null=True, blank=True)
def save(self, *args, **kwargs):
self.comment_stripped = (

View File

@@ -279,6 +279,7 @@ class TeamspaceComment(BaseModel):
related_name="team_space_comments",
null=True,
)
edited_at = models.DateTimeField(null=True, blank=True)
class Meta:
db_table = "team_space_comments"

View File

@@ -248,6 +248,9 @@ class ProjectTemplate(BaseModel):
workspace = models.ForeignKey(
"db.Workspace", on_delete=models.CASCADE, related_name="project_templates"
)
template = models.ForeignKey(
Template, on_delete=models.CASCADE, related_name="project_templates", null=True
)
# basics
name = models.CharField(max_length=255, verbose_name="Project Name")