mirror of
https://github.com/makeplane/plane
synced 2025-08-07 19:59:33 +00:00
[WEB-3957] chore: IntakeIssues with iexact 'in-app' changed to 'IN_APP' (#6977)
* migration: data with iexact 'in-app' changed to 'IN_APP' * chore: add start_of_week field in profile * chore: define variables for choices * chore: merge migration files
This commit is contained in:
25
apiserver/plane/db/migrations/0094_auto_20250425_0902.py
Normal file
25
apiserver/plane/db/migrations/0094_auto_20250425_0902.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# Generated by Django 4.2.17 on 2025-04-25 09:02
|
||||
|
||||
from django.db import migrations, models
|
||||
from plane.db.models.intake import SourceType
|
||||
|
||||
def set_default_source_type(apps, schema_editor):
|
||||
IntakeIssue = apps.get_model("db", "IntakeIssue")
|
||||
IntakeIssue.objects.filter(source__iexact="in-app").update(source=SourceType.IN_APP)
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
('db', '0093_page_moved_to_page_page_moved_to_project_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(
|
||||
set_default_source_type,
|
||||
migrations.RunPython.noop,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='profile',
|
||||
name='start_of_the_week',
|
||||
field=models.PositiveSmallIntegerField(choices=[(0, 'Sunday'), (1, 'Monday'), (2, 'Tuesday'), (3, 'Wednesday'), (4, 'Thursday'), (5, 'Friday'), (6, 'Saturday')], default=0),
|
||||
),
|
||||
]
|
||||
@@ -164,6 +164,24 @@ class User(AbstractBaseUser, PermissionsMixin):
|
||||
|
||||
|
||||
class Profile(TimeAuditModel):
|
||||
SUNDAY = 0
|
||||
MONDAY = 1
|
||||
TUESDAY = 2
|
||||
WEDNESDAY = 3
|
||||
THURSDAY = 4
|
||||
FRIDAY = 5
|
||||
SATURDAY = 6
|
||||
|
||||
START_OF_THE_WEEK_CHOICES = (
|
||||
(SUNDAY, "Sunday"),
|
||||
(MONDAY, "Monday"),
|
||||
(TUESDAY, "Tuesday"),
|
||||
(WEDNESDAY, "Wednesday"),
|
||||
(THURSDAY, "Thursday"),
|
||||
(FRIDAY, "Friday"),
|
||||
(SATURDAY, "Saturday"),
|
||||
)
|
||||
|
||||
id = models.UUIDField(
|
||||
default=uuid.uuid4, unique=True, editable=False, db_index=True, primary_key=True
|
||||
)
|
||||
@@ -194,6 +212,9 @@ class Profile(TimeAuditModel):
|
||||
mobile_timezone_auto_set = models.BooleanField(default=False)
|
||||
# language
|
||||
language = models.CharField(max_length=255, default="en")
|
||||
start_of_the_week = models.PositiveSmallIntegerField(
|
||||
choices=START_OF_THE_WEEK_CHOICES, default=SUNDAY
|
||||
)
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Profile"
|
||||
|
||||
Reference in New Issue
Block a user