[WEB-5350] migration: navigation (#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>
This commit is contained in:
parent
0f4309659a
commit
ba4e711f9b
2 changed files with 33 additions and 0 deletions
|
|
@ -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),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
@ -301,6 +301,10 @@ class WorkspaceTheme(BaseModel):
|
||||||
|
|
||||||
|
|
||||||
class WorkspaceUserProperties(BaseModel):
|
class WorkspaceUserProperties(BaseModel):
|
||||||
|
class NavigationControlPreference(models.TextChoices):
|
||||||
|
ACCORDION = "ACCORDION", "Accordion"
|
||||||
|
TABBED = "TABBED", "Tabbed"
|
||||||
|
|
||||||
workspace = models.ForeignKey(
|
workspace = models.ForeignKey(
|
||||||
"db.Workspace",
|
"db.Workspace",
|
||||||
on_delete=models.CASCADE,
|
on_delete=models.CASCADE,
|
||||||
|
|
@ -315,6 +319,12 @@ class WorkspaceUserProperties(BaseModel):
|
||||||
display_filters = models.JSONField(default=get_default_display_filters)
|
display_filters = models.JSONField(default=get_default_display_filters)
|
||||||
display_properties = models.JSONField(default=get_default_display_properties)
|
display_properties = models.JSONField(default=get_default_display_properties)
|
||||||
rich_filters = models.JSONField(default=dict)
|
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:
|
class Meta:
|
||||||
unique_together = ["workspace", "user", "deleted_at"]
|
unique_together = ["workspace", "user", "deleted_at"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue