From 3d8da99eec4c135b2242995ebf14df8a4e24d896 Mon Sep 17 00:00:00 2001 From: Nikhil <118773738+pablohashescobar@users.noreply.github.com> Date: Sat, 18 Nov 2023 16:18:06 +0530 Subject: [PATCH] chore: user onboarding workflow (#2791) --- ..._case_alter_workspace_organization_size.py | 23 +++++++++++++++++++ apiserver/plane/db/models/user.py | 1 + apiserver/plane/db/models/workspace.py | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 apiserver/plane/db/migrations/0050_user_use_case_alter_workspace_organization_size.py diff --git a/apiserver/plane/db/migrations/0050_user_use_case_alter_workspace_organization_size.py b/apiserver/plane/db/migrations/0050_user_use_case_alter_workspace_organization_size.py new file mode 100644 index 000000000..3f00f0ed9 --- /dev/null +++ b/apiserver/plane/db/migrations/0050_user_use_case_alter_workspace_organization_size.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.5 on 2023-11-17 08:48 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('db', '0049_auto_20231116_0713'), + ] + + operations = [ + migrations.AddField( + model_name='user', + name='use_case', + field=models.TextField(blank=True, null=True), + ), + migrations.AlterField( + model_name='workspace', + name='organization_size', + field=models.CharField(blank=True, max_length=20, null=True), + ), + ] diff --git a/apiserver/plane/db/models/user.py b/apiserver/plane/db/models/user.py index e90e19c5e..fe75a6a26 100644 --- a/apiserver/plane/db/models/user.py +++ b/apiserver/plane/db/models/user.py @@ -86,6 +86,7 @@ class User(AbstractBaseUser, PermissionsMixin): display_name = models.CharField(max_length=255, default="") is_tour_completed = models.BooleanField(default=False) onboarding_step = models.JSONField(default=get_default_onboarding) + use_case = models.TextField(blank=True, null=True) USERNAME_FIELD = "email" diff --git a/apiserver/plane/db/models/workspace.py b/apiserver/plane/db/models/workspace.py index 3b694062b..cbf4d97df 100644 --- a/apiserver/plane/db/models/workspace.py +++ b/apiserver/plane/db/models/workspace.py @@ -72,7 +72,7 @@ class Workspace(BaseModel): related_name="owner_workspace", ) slug = models.SlugField(max_length=48, db_index=True, unique=True) - organization_size = models.CharField(max_length=20) + organization_size = models.CharField(max_length=20, blank=True, null=True) def __str__(self): """Return name of the Workspace"""