migrations: Fix initial value for automatic policy migrations.

Migration 0476 was incorrectly not updated for changes in the
defaults -- we intended the "never" value.
This commit is contained in:
Tim Abbott 2023-10-05 16:10:05 -07:00
parent f2a00c7b9d
commit 2bfbbf0035
2 changed files with 28 additions and 8 deletions

View File

@ -2,6 +2,8 @@
from django.db import migrations, models
AUTOMATICALLY_CHANGE_VISIBILITY_POLICY_NEVER = 4
class Migration(migrations.Migration):
dependencies = [
@ -12,21 +14,29 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name="realmuserdefault",
name="automatically_follow_topics_policy",
field=models.PositiveSmallIntegerField(default=3),
field=models.PositiveSmallIntegerField(
default=AUTOMATICALLY_CHANGE_VISIBILITY_POLICY_NEVER
),
),
migrations.AddField(
model_name="realmuserdefault",
name="automatically_unmute_topics_in_muted_streams_policy",
field=models.PositiveSmallIntegerField(default=3),
field=models.PositiveSmallIntegerField(
default=AUTOMATICALLY_CHANGE_VISIBILITY_POLICY_NEVER
),
),
migrations.AddField(
model_name="userprofile",
name="automatically_follow_topics_policy",
field=models.PositiveSmallIntegerField(default=3),
field=models.PositiveSmallIntegerField(
default=AUTOMATICALLY_CHANGE_VISIBILITY_POLICY_NEVER
),
),
migrations.AddField(
model_name="userprofile",
name="automatically_unmute_topics_in_muted_streams_policy",
field=models.PositiveSmallIntegerField(default=3),
field=models.PositiveSmallIntegerField(
default=AUTOMATICALLY_CHANGE_VISIBILITY_POLICY_NEVER
),
),
]

View File

@ -2,6 +2,8 @@
from django.db import migrations, models
AUTOMATICALLY_CHANGE_VISIBILITY_POLICY_NEVER = 4
class Migration(migrations.Migration):
dependencies = [
@ -12,21 +14,29 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name="realmuserdefault",
name="automatically_follow_topics_policy",
field=models.PositiveSmallIntegerField(default=4),
field=models.PositiveSmallIntegerField(
default=AUTOMATICALLY_CHANGE_VISIBILITY_POLICY_NEVER
),
),
migrations.AlterField(
model_name="realmuserdefault",
name="automatically_unmute_topics_in_muted_streams_policy",
field=models.PositiveSmallIntegerField(default=4),
field=models.PositiveSmallIntegerField(
default=AUTOMATICALLY_CHANGE_VISIBILITY_POLICY_NEVER
),
),
migrations.AlterField(
model_name="userprofile",
name="automatically_follow_topics_policy",
field=models.PositiveSmallIntegerField(default=4),
field=models.PositiveSmallIntegerField(
default=AUTOMATICALLY_CHANGE_VISIBILITY_POLICY_NEVER
),
),
migrations.AlterField(
model_name="userprofile",
name="automatically_unmute_topics_in_muted_streams_policy",
field=models.PositiveSmallIntegerField(default=4),
field=models.PositiveSmallIntegerField(
default=AUTOMATICALLY_CHANGE_VISIBILITY_POLICY_NEVER
),
),
]