Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

[WEB-5350] migration: navigation (#8156)

Sangeethaba4e711f9b5a
diff --git a/apps/api/plane/db/migrations/0110_workspaceuserproperties_navigation_control_preference_and_more.py b/apps/api/plane/db/migrations/0110_workspaceuserproperties_navigation_control_preference_and_more.py
new file mode 100644
index 0000000000..a36f54c265
--- /dev/null
+++ b/apps/api/plane/db/migrations/0110_workspaceuserproperties_navigation_control_preference_and_more.py
@@ -0,0 +1,23 @@
+# Generated by Django 4.2.26 on 2025-11-21 11:32
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('db', '0109_issuecomment_description_and_parent_id'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='workspaceuserproperties',
+ name='navigation_control_preference',
+ field=models.CharField(choices=[('ACCORDION', 'Accordion'), ('TABBED', 'Tabbed')], default='ACCORDION', max_length=25),
+ ),
+ migrations.AddField(
+ model_name='workspaceuserproperties',
+ name='navigation_project_limit',
+ field=models.IntegerField(default=10),
+ ),
+ ]
diff --git a/apps/api/plane/db/models/workspace.py b/apps/api/plane/db/models/workspace.py
index 0f5c09760a..b545f52a26 100644
--- a/apps/api/plane/db/models/workspace.py
+++ b/apps/api/plane/db/models/workspace.py
@@ -301,6 +301,10 @@ class WorkspaceTheme(BaseModel):
class WorkspaceUserProperties(BaseModel):
+ class NavigationControlPreference(models.TextChoices):
+ ACCORDION = "ACCORDION", "Accordion"
+ TABBED = "TABBED", "Tabbed"
+
workspace = models.ForeignKey(
"db.Workspace",
on_delete=models.CASCADE,
@@ -315,6 +319,12 @@ class WorkspaceUserProperties(BaseModel):
display_filters = models.JSONField(default=get_default_display_filters)
display_properties = models.JSONField(default=get_default_display_properties)
rich_filters = models.JSONField(default=dict)
+ navigation_project_limit = models.IntegerField(default=10)
+ navigation_control_preference = models.CharField(
+ max_length=25,
+ choices=NavigationControlPreference.choices,
+ default=NavigationControlPreference.ACCORDION,
+ )
class Meta:
unique_together = ["workspace", "user", "deleted_at"]