mirror of
https://github.com/makeplane/plane.git
synced 2026-07-13 14:01:45 +02:00
migrations: changes in project templates, workspace connections and entity updates (#2722)
* chore: update project template migrations * chore: added migration for workspace connection disconnect_meta * chore: update migration files * chore: model changes * chore: added epic in entity update --------- Co-authored-by: Henit Chobisa <chobisa.henit@gmail.com> Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
# Generated by Django 4.2.18 on 2025-03-12 08:39
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('ee', '0026_projecttemplate_pagetemplate_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='projecttemplate',
|
||||
name='cover_asset',
|
||||
field=models.TextField(default=dict),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='projecttemplate',
|
||||
name='intake_settings',
|
||||
field=models.JSONField(default=dict),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='projecttemplate',
|
||||
name='members',
|
||||
field=models.JSONField(default=dict),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='workspaceconnection',
|
||||
name='disconnect_meta',
|
||||
field=models.JSONField(blank=True, default=dict),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='workspacecredential',
|
||||
name='source',
|
||||
field=models.CharField(max_length=60),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='workspaceentityconnection',
|
||||
name='type',
|
||||
field=models.CharField(blank=True, max_length=60, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="entityupdates",
|
||||
name="epic",
|
||||
field=models.ForeignKey(
|
||||
blank=True,
|
||||
null=True,
|
||||
on_delete=django.db.models.deletion.DO_NOTHING,
|
||||
related_name="epic_updates",
|
||||
to="db.issue",
|
||||
),
|
||||
),
|
||||
]
|
||||
@@ -249,6 +249,13 @@ class EntityUpdates(BaseModel):
|
||||
null=True,
|
||||
blank=True,
|
||||
)
|
||||
epic = models.ForeignKey(
|
||||
"db.Issue",
|
||||
on_delete=models.DO_NOTHING,
|
||||
related_name="epic_updates",
|
||||
null=True,
|
||||
blank=True,
|
||||
)
|
||||
entity_type = models.CharField(max_length=30, choices=EntityTypeEnum.choices)
|
||||
description = models.TextField(blank=True)
|
||||
description_html = models.TextField(blank=True, default="<p></p>")
|
||||
|
||||
@@ -262,6 +262,7 @@ class ProjectTemplate(BaseModel):
|
||||
default_assignee = models.JSONField(default=dict)
|
||||
project_lead = models.JSONField(default=dict)
|
||||
logo_props = models.JSONField(default=dict)
|
||||
cover_asset = models.TextField(default=dict)
|
||||
|
||||
# Feature toggles
|
||||
module_view = models.BooleanField(default=True)
|
||||
@@ -303,6 +304,8 @@ class ProjectTemplate(BaseModel):
|
||||
estimates = models.JSONField(default=dict)
|
||||
workitem_types = models.JSONField(default=dict)
|
||||
epics = models.JSONField(default=dict)
|
||||
members = models.JSONField(default=dict)
|
||||
intake_settings = models.JSONField(default=dict)
|
||||
|
||||
class Meta:
|
||||
unique_together = ["name", "workspace", "deleted_at"]
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# Django imports
|
||||
from django.db import models
|
||||
from django.db import models, transaction
|
||||
from django.conf import settings
|
||||
from django.utils import timezone
|
||||
from django.contrib.auth import get_user_model
|
||||
|
||||
# Module imports
|
||||
from plane.db.models.base import BaseModel
|
||||
@@ -104,7 +105,7 @@ class WorkspaceActivity(WorkspaceBaseModel):
|
||||
|
||||
|
||||
class WorkspaceCredential(BaseModel):
|
||||
source = models.CharField(max_length=20) # importer type
|
||||
source = models.CharField(max_length=60) # importer type
|
||||
workspace = models.ForeignKey(
|
||||
"db.Workspace", on_delete=models.CASCADE, related_name="credentials"
|
||||
)
|
||||
@@ -162,6 +163,7 @@ class WorkspaceConnection(BaseModel):
|
||||
null=True,
|
||||
blank=True,
|
||||
)
|
||||
disconnect_meta = models.JSONField(default=dict, blank=True)
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Workspace Connection"
|
||||
@@ -179,7 +181,7 @@ class WorkspaceConnection(BaseModel):
|
||||
|
||||
|
||||
class WorkspaceEntityConnection(BaseModel):
|
||||
type = models.CharField(max_length=30, blank=True, null=True)
|
||||
type = models.CharField(max_length=60, blank=True, null=True)
|
||||
workspace_connection = models.ForeignKey(
|
||||
"ee.WorkspaceConnection",
|
||||
on_delete=models.CASCADE,
|
||||
|
||||
Reference in New Issue
Block a user