mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: user migrations for back population (#1578)
This commit is contained in:
parent
5c5bcb33e3
commit
1bae9289f5
@ -8,6 +8,7 @@ import plane.db.models.user
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def onboarding_default_steps(apps, schema_editor):
|
def onboarding_default_steps(apps, schema_editor):
|
||||||
default_onboarding_schema = {
|
default_onboarding_schema = {
|
||||||
"workspace_join": True,
|
"workspace_join": True,
|
||||||
@ -23,7 +24,7 @@ def onboarding_default_steps(apps, schema_editor):
|
|||||||
obj.is_tour_completed = True
|
obj.is_tour_completed = True
|
||||||
updated_user.append(obj)
|
updated_user.append(obj)
|
||||||
|
|
||||||
Model.objects.bulk_update(updated_user, ["onboarding_step"], batch_size=100)
|
Model.objects.bulk_update(updated_user, ["onboarding_step", "is_tour_completed"], batch_size=100)
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
@ -79,6 +80,7 @@ class Migration(migrations.Migration):
|
|||||||
name="onboarding_step",
|
name="onboarding_step",
|
||||||
field=models.JSONField(default=plane.db.models.user.get_default_onboarding),
|
field=models.JSONField(default=plane.db.models.user.get_default_onboarding),
|
||||||
),
|
),
|
||||||
|
migrations.RunPython(onboarding_default_steps),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name="Notification",
|
name="Notification",
|
||||||
fields=[
|
fields=[
|
||||||
|
Loading…
Reference in New Issue
Block a user