Skip to content

Commit 2769b1d

Browse files
sangeethailangodheeru0198
authored andcommitted
[WEB-5350] migration: navigation (makeplane#8156)
* migration: navigation related fields in workspace_user_properties * fix: field names * fix: remove max_length * fix: create new migration * fix: typo * Renamed horizontal preference to tabbed --------- Co-authored-by: Dheeraj Kumar Ketireddy <dheeru0198@gmail.com>
1 parent 23d4219 commit 2769b1d

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Generated by Django 4.2.26 on 2025-11-21 11:32
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('db', '0109_issuecomment_description_and_parent_id'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='workspaceuserproperties',
15+
name='navigation_control_preference',
16+
field=models.CharField(choices=[('ACCORDION', 'Accordion'), ('TABBED', 'Tabbed')], default='ACCORDION', max_length=25),
17+
),
18+
migrations.AddField(
19+
model_name='workspaceuserproperties',
20+
name='navigation_project_limit',
21+
field=models.IntegerField(default=10),
22+
),
23+
]

apps/api/plane/db/models/workspace.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,10 @@ class Meta:
301301

302302

303303
class WorkspaceUserProperties(BaseModel):
304+
class NavigationControlPreference(models.TextChoices):
305+
ACCORDION = "ACCORDION", "Accordion"
306+
TABBED = "TABBED", "Tabbed"
307+
304308
workspace = models.ForeignKey(
305309
"db.Workspace",
306310
on_delete=models.CASCADE,
@@ -315,6 +319,12 @@ class WorkspaceUserProperties(BaseModel):
315319
display_filters = models.JSONField(default=get_default_display_filters)
316320
display_properties = models.JSONField(default=get_default_display_properties)
317321
rich_filters = models.JSONField(default=dict)
322+
navigation_project_limit = models.IntegerField(default=10)
323+
navigation_control_preference = models.CharField(
324+
max_length=25,
325+
choices=NavigationControlPreference.choices,
326+
default=NavigationControlPreference.ACCORDION,
327+
)
318328

319329
class Meta:
320330
unique_together = ["workspace", "user", "deleted_at"]

0 commit comments

Comments
 (0)