Update user model with new fields and migration adjustments

Applies multiple migration changes to the user model, introducing new fields such as display_name, activity_visibility, and privacy_level, while also adjusting dependencies and removing outdated triggers.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: eff39de1-3afa-446d-a965-acaf61837fc7
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/d6d61dac-164d-45dd-929f-7dcdfd771b64/eff39de1-3afa-446d-a965-acaf61837fc7/NsPV9U7
This commit is contained in:
pac7
2025-09-21 00:46:25 +00:00
committed by pacnpal
parent 132872d2c8
commit 90e03355ac
87 changed files with 1297 additions and 13527 deletions

View File

@@ -1,496 +0,0 @@
# Generated by Django 5.1.4 on 2025-08-13 21:35
import django.db.models.deletion
import pgtrigger.compiler
import pgtrigger.migrations
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
("contenttypes", "0002_remove_content_type_name"),
("pghistory", "0006_delete_aggregateevent"),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name="EditSubmission",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("updated_at", models.DateTimeField(auto_now=True)),
(
"object_id",
models.PositiveIntegerField(blank=True, null=True),
),
(
"submission_type",
models.CharField(
choices=[
("EDIT", "Edit Existing"),
("CREATE", "Create New"),
],
default="EDIT",
max_length=10,
),
),
(
"changes",
models.JSONField(
help_text="JSON representation of the changes or new object data"
),
),
(
"moderator_changes",
models.JSONField(
blank=True,
help_text="Moderator's edited version of the changes before approval",
null=True,
),
),
(
"reason",
models.TextField(help_text="Why this edit/addition is needed"),
),
(
"source",
models.TextField(
blank=True,
help_text="Source of information (if applicable)",
),
),
(
"status",
models.CharField(
choices=[
("PENDING", "Pending"),
("APPROVED", "Approved"),
("REJECTED", "Rejected"),
("ESCALATED", "Escalated"),
],
default="PENDING",
max_length=20,
),
),
("created_at", models.DateTimeField(auto_now_add=True)),
("handled_at", models.DateTimeField(blank=True, null=True)),
(
"notes",
models.TextField(
blank=True,
help_text="Notes from the moderator about this submission",
),
),
(
"content_type",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="contenttypes.contenttype",
),
),
(
"handled_by",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="handled_submissions",
to=settings.AUTH_USER_MODEL,
),
),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="edit_submissions",
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"ordering": ["-created_at"],
},
),
migrations.CreateModel(
name="EditSubmissionEvent",
fields=[
(
"pgh_id",
models.AutoField(primary_key=True, serialize=False),
),
("pgh_created_at", models.DateTimeField(auto_now_add=True)),
("pgh_label", models.TextField(help_text="The event label.")),
("id", models.BigIntegerField()),
("updated_at", models.DateTimeField(auto_now=True)),
(
"object_id",
models.PositiveIntegerField(blank=True, null=True),
),
(
"submission_type",
models.CharField(
choices=[
("EDIT", "Edit Existing"),
("CREATE", "Create New"),
],
default="EDIT",
max_length=10,
),
),
(
"changes",
models.JSONField(
help_text="JSON representation of the changes or new object data"
),
),
(
"moderator_changes",
models.JSONField(
blank=True,
help_text="Moderator's edited version of the changes before approval",
null=True,
),
),
(
"reason",
models.TextField(help_text="Why this edit/addition is needed"),
),
(
"source",
models.TextField(
blank=True,
help_text="Source of information (if applicable)",
),
),
(
"status",
models.CharField(
choices=[
("PENDING", "Pending"),
("APPROVED", "Approved"),
("REJECTED", "Rejected"),
("ESCALATED", "Escalated"),
],
default="PENDING",
max_length=20,
),
),
("created_at", models.DateTimeField(auto_now_add=True)),
("handled_at", models.DateTimeField(blank=True, null=True)),
(
"notes",
models.TextField(
blank=True,
help_text="Notes from the moderator about this submission",
),
),
(
"content_type",
models.ForeignKey(
db_constraint=False,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="+",
related_query_name="+",
to="contenttypes.contenttype",
),
),
(
"handled_by",
models.ForeignKey(
blank=True,
db_constraint=False,
null=True,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="+",
related_query_name="+",
to=settings.AUTH_USER_MODEL,
),
),
(
"pgh_context",
models.ForeignKey(
db_constraint=False,
null=True,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="+",
to="pghistory.context",
),
),
(
"pgh_obj",
models.ForeignKey(
db_constraint=False,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="events",
to="moderation.editsubmission",
),
),
(
"user",
models.ForeignKey(
db_constraint=False,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="+",
related_query_name="+",
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"abstract": False,
},
),
migrations.CreateModel(
name="PhotoSubmission",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("updated_at", models.DateTimeField(auto_now=True)),
("object_id", models.PositiveIntegerField()),
("photo", models.ImageField(upload_to="submissions/photos/")),
("caption", models.CharField(blank=True, max_length=255)),
("date_taken", models.DateField(blank=True, null=True)),
(
"status",
models.CharField(
choices=[
("PENDING", "Pending"),
("APPROVED", "Approved"),
("REJECTED", "Rejected"),
("ESCALATED", "Escalated"),
],
default="PENDING",
max_length=20,
),
),
("created_at", models.DateTimeField(auto_now_add=True)),
("handled_at", models.DateTimeField(blank=True, null=True)),
(
"notes",
models.TextField(
blank=True,
help_text="Notes from the moderator about this photo submission",
),
),
(
"content_type",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="contenttypes.contenttype",
),
),
(
"handled_by",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="handled_photos",
to=settings.AUTH_USER_MODEL,
),
),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="photo_submissions",
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"ordering": ["-created_at"],
},
),
migrations.CreateModel(
name="PhotoSubmissionEvent",
fields=[
(
"pgh_id",
models.AutoField(primary_key=True, serialize=False),
),
("pgh_created_at", models.DateTimeField(auto_now_add=True)),
("pgh_label", models.TextField(help_text="The event label.")),
("id", models.BigIntegerField()),
("updated_at", models.DateTimeField(auto_now=True)),
("object_id", models.PositiveIntegerField()),
("photo", models.ImageField(upload_to="submissions/photos/")),
("caption", models.CharField(blank=True, max_length=255)),
("date_taken", models.DateField(blank=True, null=True)),
(
"status",
models.CharField(
choices=[
("PENDING", "Pending"),
("APPROVED", "Approved"),
("REJECTED", "Rejected"),
("ESCALATED", "Escalated"),
],
default="PENDING",
max_length=20,
),
),
("created_at", models.DateTimeField(auto_now_add=True)),
("handled_at", models.DateTimeField(blank=True, null=True)),
(
"notes",
models.TextField(
blank=True,
help_text="Notes from the moderator about this photo submission",
),
),
(
"content_type",
models.ForeignKey(
db_constraint=False,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="+",
related_query_name="+",
to="contenttypes.contenttype",
),
),
(
"handled_by",
models.ForeignKey(
blank=True,
db_constraint=False,
null=True,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="+",
related_query_name="+",
to=settings.AUTH_USER_MODEL,
),
),
(
"pgh_context",
models.ForeignKey(
db_constraint=False,
null=True,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="+",
to="pghistory.context",
),
),
(
"pgh_obj",
models.ForeignKey(
db_constraint=False,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="events",
to="moderation.photosubmission",
),
),
(
"user",
models.ForeignKey(
db_constraint=False,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="+",
related_query_name="+",
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"abstract": False,
},
),
migrations.AddIndex(
model_name="editsubmission",
index=models.Index(
fields=["content_type", "object_id"],
name="moderation__content_922d2b_idx",
),
),
migrations.AddIndex(
model_name="editsubmission",
index=models.Index(fields=["status"], name="moderation__status_e4eb2b_idx"),
),
pgtrigger.migrations.AddTrigger(
model_name="editsubmission",
trigger=pgtrigger.compiler.Trigger(
name="insert_insert",
sql=pgtrigger.compiler.UpsertTriggerSql(
func='INSERT INTO "moderation_editsubmissionevent" ("changes", "content_type_id", "created_at", "handled_at", "handled_by_id", "id", "moderator_changes", "notes", "object_id", "pgh_context_id", "pgh_created_at", "pgh_label", "pgh_obj_id", "reason", "source", "status", "submission_type", "updated_at", "user_id") VALUES (NEW."changes", NEW."content_type_id", NEW."created_at", NEW."handled_at", NEW."handled_by_id", NEW."id", NEW."moderator_changes", NEW."notes", NEW."object_id", _pgh_attach_context(), NOW(), \'insert\', NEW."id", NEW."reason", NEW."source", NEW."status", NEW."submission_type", NEW."updated_at", NEW."user_id"); RETURN NULL;',
hash="[AWS-SECRET-REMOVED]",
operation="INSERT",
pgid="pgtrigger_insert_insert_2c796",
table="moderation_editsubmission",
when="AFTER",
),
),
),
pgtrigger.migrations.AddTrigger(
model_name="editsubmission",
trigger=pgtrigger.compiler.Trigger(
name="update_update",
sql=pgtrigger.compiler.UpsertTriggerSql(
condition="WHEN (OLD.* IS DISTINCT FROM NEW.*)",
func='INSERT INTO "moderation_editsubmissionevent" ("changes", "content_type_id", "created_at", "handled_at", "handled_by_id", "id", "moderator_changes", "notes", "object_id", "pgh_context_id", "pgh_created_at", "pgh_label", "pgh_obj_id", "reason", "source", "status", "submission_type", "updated_at", "user_id") VALUES (NEW."changes", NEW."content_type_id", NEW."created_at", NEW."handled_at", NEW."handled_by_id", NEW."id", NEW."moderator_changes", NEW."notes", NEW."object_id", _pgh_attach_context(), NOW(), \'update\', NEW."id", NEW."reason", NEW."source", NEW."status", NEW."submission_type", NEW."updated_at", NEW."user_id"); RETURN NULL;',
hash="[AWS-SECRET-REMOVED]",
operation="UPDATE",
pgid="pgtrigger_update_update_ab38f",
table="moderation_editsubmission",
when="AFTER",
),
),
),
migrations.AddIndex(
model_name="photosubmission",
index=models.Index(
fields=["content_type", "object_id"],
name="moderation__content_7a7bc1_idx",
),
),
migrations.AddIndex(
model_name="photosubmission",
index=models.Index(fields=["status"], name="moderation__status_7a1914_idx"),
),
pgtrigger.migrations.AddTrigger(
model_name="photosubmission",
trigger=pgtrigger.compiler.Trigger(
name="insert_insert",
sql=pgtrigger.compiler.UpsertTriggerSql(
func='INSERT INTO "moderation_photosubmissionevent" ("caption", "content_type_id", "created_at", "date_taken", "handled_at", "handled_by_id", "id", "notes", "object_id", "pgh_context_id", "pgh_created_at", "pgh_label", "pgh_obj_id", "photo", "status", "updated_at", "user_id") VALUES (NEW."caption", NEW."content_type_id", NEW."created_at", NEW."date_taken", NEW."handled_at", NEW."handled_by_id", NEW."id", NEW."notes", NEW."object_id", _pgh_attach_context(), NOW(), \'insert\', NEW."id", NEW."photo", NEW."status", NEW."updated_at", NEW."user_id"); RETURN NULL;',
hash="[AWS-SECRET-REMOVED]",
operation="INSERT",
pgid="pgtrigger_insert_insert_62865",
table="moderation_photosubmission",
when="AFTER",
),
),
),
pgtrigger.migrations.AddTrigger(
model_name="photosubmission",
trigger=pgtrigger.compiler.Trigger(
name="update_update",
sql=pgtrigger.compiler.UpsertTriggerSql(
condition="WHEN (OLD.* IS DISTINCT FROM NEW.*)",
func='INSERT INTO "moderation_photosubmissionevent" ("caption", "content_type_id", "created_at", "date_taken", "handled_at", "handled_by_id", "id", "notes", "object_id", "pgh_context_id", "pgh_created_at", "pgh_label", "pgh_obj_id", "photo", "status", "updated_at", "user_id") VALUES (NEW."caption", NEW."content_type_id", NEW."created_at", NEW."date_taken", NEW."handled_at", NEW."handled_by_id", NEW."id", NEW."notes", NEW."object_id", _pgh_attach_context(), NOW(), \'update\', NEW."id", NEW."photo", NEW."status", NEW."updated_at", NEW."user_id"); RETURN NULL;',
hash="[AWS-SECRET-REMOVED]",
operation="UPDATE",
pgid="pgtrigger_update_update_9c311",
table="moderation_photosubmission",
when="AFTER",
),
),
),
]

View File

@@ -1,88 +0,0 @@
# Generated by Django 5.2.5 on 2025-08-24 18:23
import pgtrigger.compiler
import pgtrigger.migrations
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("moderation", "0001_initial"),
]
operations = [
pgtrigger.migrations.RemoveTrigger(
model_name="editsubmission",
name="insert_insert",
),
pgtrigger.migrations.RemoveTrigger(
model_name="editsubmission",
name="update_update",
),
pgtrigger.migrations.RemoveTrigger(
model_name="photosubmission",
name="insert_insert",
),
pgtrigger.migrations.RemoveTrigger(
model_name="photosubmission",
name="update_update",
),
pgtrigger.migrations.AddTrigger(
model_name="editsubmission",
trigger=pgtrigger.compiler.Trigger(
name="insert_insert",
sql=pgtrigger.compiler.UpsertTriggerSql(
func='INSERT INTO "moderation_editsubmissionevent" ("changes", "content_type_id", "created_at", "handled_at", "handled_by_id", "id", "moderator_changes", "notes", "object_id", "pgh_context_id", "pgh_created_at", "pgh_label", "pgh_obj_id", "reason", "source", "status", "submission_type", "updated_at", "user_id") VALUES (NEW."changes", NEW."content_type_id", NEW."created_at", NEW."handled_at", NEW."handled_by_id", NEW."id", NEW."moderator_changes", NEW."notes", NEW."object_id", _pgh_attach_context(), NOW(), \'insert\', NEW."id", NEW."reason", NEW."source", NEW."status", NEW."submission_type", NEW."updated_at", NEW."user_id"); RETURN NULL;',
hash="0e394e419ba234dd23cb0f4f6567611ad71f2a38",
operation="INSERT",
pgid="pgtrigger_insert_insert_2c796",
table="moderation_editsubmission",
when="AFTER",
),
),
),
pgtrigger.migrations.AddTrigger(
model_name="editsubmission",
trigger=pgtrigger.compiler.Trigger(
name="update_update",
sql=pgtrigger.compiler.UpsertTriggerSql(
condition="WHEN (OLD.* IS DISTINCT FROM NEW.*)",
func='INSERT INTO "moderation_editsubmissionevent" ("changes", "content_type_id", "created_at", "handled_at", "handled_by_id", "id", "moderator_changes", "notes", "object_id", "pgh_context_id", "pgh_created_at", "pgh_label", "pgh_obj_id", "reason", "source", "status", "submission_type", "updated_at", "user_id") VALUES (NEW."changes", NEW."content_type_id", NEW."created_at", NEW."handled_at", NEW."handled_by_id", NEW."id", NEW."moderator_changes", NEW."notes", NEW."object_id", _pgh_attach_context(), NOW(), \'update\', NEW."id", NEW."reason", NEW."source", NEW."status", NEW."submission_type", NEW."updated_at", NEW."user_id"); RETURN NULL;',
hash="315b76df75a52d610d3d0857fd5821101e551410",
operation="UPDATE",
pgid="pgtrigger_update_update_ab38f",
table="moderation_editsubmission",
when="AFTER",
),
),
),
pgtrigger.migrations.AddTrigger(
model_name="photosubmission",
trigger=pgtrigger.compiler.Trigger(
name="insert_insert",
sql=pgtrigger.compiler.UpsertTriggerSql(
func='INSERT INTO "moderation_photosubmissionevent" ("caption", "content_type_id", "created_at", "date_taken", "handled_at", "handled_by_id", "id", "notes", "object_id", "pgh_context_id", "pgh_created_at", "pgh_label", "pgh_obj_id", "photo", "status", "updated_at", "user_id") VALUES (NEW."caption", NEW."content_type_id", NEW."created_at", NEW."date_taken", NEW."handled_at", NEW."handled_by_id", NEW."id", NEW."notes", NEW."object_id", _pgh_attach_context(), NOW(), \'insert\', NEW."id", NEW."photo", NEW."status", NEW."updated_at", NEW."user_id"); RETURN NULL;',
hash="e967ea629575f6b26892db225b40add9a1558cfb",
operation="INSERT",
pgid="pgtrigger_insert_insert_62865",
table="moderation_photosubmission",
when="AFTER",
),
),
),
pgtrigger.migrations.AddTrigger(
model_name="photosubmission",
trigger=pgtrigger.compiler.Trigger(
name="update_update",
sql=pgtrigger.compiler.UpsertTriggerSql(
condition="WHEN (OLD.* IS DISTINCT FROM NEW.*)",
func='INSERT INTO "moderation_photosubmissionevent" ("caption", "content_type_id", "created_at", "date_taken", "handled_at", "handled_by_id", "id", "notes", "object_id", "pgh_context_id", "pgh_created_at", "pgh_label", "pgh_obj_id", "photo", "status", "updated_at", "user_id") VALUES (NEW."caption", NEW."content_type_id", NEW."created_at", NEW."date_taken", NEW."handled_at", NEW."handled_by_id", NEW."id", NEW."notes", NEW."object_id", _pgh_attach_context(), NOW(), \'update\', NEW."id", NEW."photo", NEW."status", NEW."updated_at", NEW."user_id"); RETURN NULL;',
hash="b7a97f4e8f90569a90fc4c35cc85e601ff25f0d9",
operation="UPDATE",
pgid="pgtrigger_update_update_9c311",
table="moderation_photosubmission",
when="AFTER",
),
),
),
]

View File

@@ -1,782 +0,0 @@
# Generated by Django 5.2.5 on 2025-08-29 19:16
import django.db.models.deletion
import django.utils.timezone
import pgtrigger.compiler
import pgtrigger.migrations
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("contenttypes", "0002_remove_content_type_name"),
(
"moderation",
"0003_bulkoperation_bulkoperationevent_moderationaction_and_more",
),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.AlterModelOptions(
name="moderationqueue",
options={"ordering": ["priority", "created_at"]},
),
pgtrigger.migrations.RemoveTrigger(
model_name="moderationqueue",
name="insert_insert",
),
pgtrigger.migrations.RemoveTrigger(
model_name="moderationqueue",
name="update_update",
),
migrations.RemoveIndex(
model_name="bulkoperation",
name="moderation__operati_bc84d9_idx",
),
migrations.RemoveIndex(
model_name="moderationaction",
name="moderation__action__7d7882_idx",
),
migrations.RemoveIndex(
model_name="moderationqueue",
name="moderation__entity__7c66ff_idx",
),
migrations.RemoveIndex(
model_name="moderationqueue",
name="moderation__flagged_169834_idx",
),
migrations.RemoveIndex(
model_name="moderationreport",
name="moderation__reporte_04923f_idx",
),
migrations.AlterField(
model_name="bulkoperation",
name="can_cancel",
field=models.BooleanField(
default=True, help_text="Whether this operation can be cancelled"
),
),
migrations.AlterField(
model_name="bulkoperation",
name="description",
field=models.TextField(help_text="Description of what this operation does"),
),
migrations.AlterField(
model_name="bulkoperation",
name="estimated_duration_minutes",
field=models.PositiveIntegerField(
blank=True, help_text="Estimated duration in minutes", null=True
),
),
migrations.AlterField(
model_name="bulkoperation",
name="failed_items",
field=models.PositiveIntegerField(
default=0, help_text="Number of items that failed"
),
),
migrations.AlterField(
model_name="bulkoperation",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
migrations.AlterField(
model_name="bulkoperation",
name="operation_type",
field=models.CharField(
choices=[
("UPDATE_PARKS", "Update Parks"),
("UPDATE_RIDES", "Update Rides"),
("IMPORT_DATA", "Import Data"),
("EXPORT_DATA", "Export Data"),
("MODERATE_CONTENT", "Moderate Content"),
("USER_ACTIONS", "User Actions"),
("CLEANUP", "Cleanup"),
("OTHER", "Other"),
],
max_length=50,
),
),
migrations.AlterField(
model_name="bulkoperation",
name="parameters",
field=models.JSONField(
default=dict, help_text="Parameters for the operation"
),
),
migrations.AlterField(
model_name="bulkoperation",
name="priority",
field=models.CharField(
choices=[
("LOW", "Low"),
("MEDIUM", "Medium"),
("HIGH", "High"),
("URGENT", "Urgent"),
],
default="MEDIUM",
max_length=10,
),
),
migrations.AlterField(
model_name="bulkoperation",
name="processed_items",
field=models.PositiveIntegerField(
default=0, help_text="Number of items processed"
),
),
migrations.AlterField(
model_name="bulkoperation",
name="results",
field=models.JSONField(
blank=True,
default=dict,
help_text="Results and output from the operation",
),
),
migrations.AlterField(
model_name="bulkoperation",
name="schedule_for",
field=models.DateTimeField(
blank=True, help_text="When to run this operation", null=True
),
),
migrations.AlterField(
model_name="bulkoperation",
name="total_items",
field=models.PositiveIntegerField(
default=0, help_text="Total number of items to process"
),
),
migrations.AlterField(
model_name="bulkoperationevent",
name="can_cancel",
field=models.BooleanField(
default=True, help_text="Whether this operation can be cancelled"
),
),
migrations.AlterField(
model_name="bulkoperationevent",
name="description",
field=models.TextField(help_text="Description of what this operation does"),
),
migrations.AlterField(
model_name="bulkoperationevent",
name="estimated_duration_minutes",
field=models.PositiveIntegerField(
blank=True, help_text="Estimated duration in minutes", null=True
),
),
migrations.AlterField(
model_name="bulkoperationevent",
name="failed_items",
field=models.PositiveIntegerField(
default=0, help_text="Number of items that failed"
),
),
migrations.AlterField(
model_name="bulkoperationevent",
name="id",
field=models.BigIntegerField(),
),
migrations.AlterField(
model_name="bulkoperationevent",
name="operation_type",
field=models.CharField(
choices=[
("UPDATE_PARKS", "Update Parks"),
("UPDATE_RIDES", "Update Rides"),
("IMPORT_DATA", "Import Data"),
("EXPORT_DATA", "Export Data"),
("MODERATE_CONTENT", "Moderate Content"),
("USER_ACTIONS", "User Actions"),
("CLEANUP", "Cleanup"),
("OTHER", "Other"),
],
max_length=50,
),
),
migrations.AlterField(
model_name="bulkoperationevent",
name="parameters",
field=models.JSONField(
default=dict, help_text="Parameters for the operation"
),
),
migrations.AlterField(
model_name="bulkoperationevent",
name="priority",
field=models.CharField(
choices=[
("LOW", "Low"),
("MEDIUM", "Medium"),
("HIGH", "High"),
("URGENT", "Urgent"),
],
default="MEDIUM",
max_length=10,
),
),
migrations.AlterField(
model_name="bulkoperationevent",
name="processed_items",
field=models.PositiveIntegerField(
default=0, help_text="Number of items processed"
),
),
migrations.AlterField(
model_name="bulkoperationevent",
name="results",
field=models.JSONField(
blank=True,
default=dict,
help_text="Results and output from the operation",
),
),
migrations.AlterField(
model_name="bulkoperationevent",
name="schedule_for",
field=models.DateTimeField(
blank=True, help_text="When to run this operation", null=True
),
),
migrations.AlterField(
model_name="bulkoperationevent",
name="total_items",
field=models.PositiveIntegerField(
default=0, help_text="Total number of items to process"
),
),
migrations.AlterField(
model_name="moderationaction",
name="action_type",
field=models.CharField(
choices=[
("WARNING", "Warning"),
("USER_SUSPENSION", "User Suspension"),
("USER_BAN", "User Ban"),
("CONTENT_REMOVAL", "Content Removal"),
("CONTENT_EDIT", "Content Edit"),
("CONTENT_RESTRICTION", "Content Restriction"),
("ACCOUNT_RESTRICTION", "Account Restriction"),
("OTHER", "Other"),
],
max_length=50,
),
),
migrations.AlterField(
model_name="moderationaction",
name="details",
field=models.TextField(help_text="Detailed explanation of the action"),
),
migrations.AlterField(
model_name="moderationaction",
name="duration_hours",
field=models.PositiveIntegerField(
blank=True,
help_text="Duration in hours for temporary actions",
null=True,
),
),
migrations.AlterField(
model_name="moderationaction",
name="expires_at",
field=models.DateTimeField(
blank=True, help_text="When this action expires", null=True
),
),
migrations.AlterField(
model_name="moderationaction",
name="is_active",
field=models.BooleanField(
default=True, help_text="Whether this action is currently active"
),
),
migrations.AlterField(
model_name="moderationaction",
name="reason",
field=models.CharField(
help_text="Brief reason for the action", max_length=200
),
),
migrations.AlterField(
model_name="moderationactionevent",
name="action_type",
field=models.CharField(
choices=[
("WARNING", "Warning"),
("USER_SUSPENSION", "User Suspension"),
("USER_BAN", "User Ban"),
("CONTENT_REMOVAL", "Content Removal"),
("CONTENT_EDIT", "Content Edit"),
("CONTENT_RESTRICTION", "Content Restriction"),
("ACCOUNT_RESTRICTION", "Account Restriction"),
("OTHER", "Other"),
],
max_length=50,
),
),
migrations.AlterField(
model_name="moderationactionevent",
name="details",
field=models.TextField(help_text="Detailed explanation of the action"),
),
migrations.AlterField(
model_name="moderationactionevent",
name="duration_hours",
field=models.PositiveIntegerField(
blank=True,
help_text="Duration in hours for temporary actions",
null=True,
),
),
migrations.AlterField(
model_name="moderationactionevent",
name="expires_at",
field=models.DateTimeField(
blank=True, help_text="When this action expires", null=True
),
),
migrations.AlterField(
model_name="moderationactionevent",
name="is_active",
field=models.BooleanField(
default=True, help_text="Whether this action is currently active"
),
),
migrations.AlterField(
model_name="moderationactionevent",
name="reason",
field=models.CharField(
help_text="Brief reason for the action", max_length=200
),
),
migrations.AlterField(
model_name="moderationqueue",
name="description",
field=models.TextField(
help_text="Detailed description of what needs to be done"
),
),
migrations.AlterField(
model_name="moderationqueue",
name="entity_id",
field=models.PositiveIntegerField(
blank=True, help_text="ID of the related entity", null=True
),
),
migrations.AlterField(
model_name="moderationqueue",
name="entity_preview",
field=models.JSONField(
blank=True, default=dict, help_text="Preview data for the entity"
),
),
migrations.AlterField(
model_name="moderationqueue",
name="entity_type",
field=models.CharField(
blank=True,
help_text="Type of entity (park, ride, user, etc.)",
max_length=50,
),
),
migrations.AlterField(
model_name="moderationqueue",
name="estimated_review_time",
field=models.PositiveIntegerField(
default=30, help_text="Estimated time in minutes"
),
),
migrations.AlterField(
model_name="moderationqueue",
name="flagged_by",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="flagged_queue_items",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name="moderationqueue",
name="item_type",
field=models.CharField(
choices=[
("CONTENT_REVIEW", "Content Review"),
("USER_REVIEW", "User Review"),
("BULK_ACTION", "Bulk Action"),
("POLICY_VIOLATION", "Policy Violation"),
("APPEAL", "Appeal"),
("OTHER", "Other"),
],
max_length=50,
),
),
migrations.AlterField(
model_name="moderationqueue",
name="status",
field=models.CharField(
choices=[
("PENDING", "Pending"),
("IN_PROGRESS", "In Progress"),
("COMPLETED", "Completed"),
("CANCELLED", "Cancelled"),
],
default="PENDING",
max_length=20,
),
),
migrations.AlterField(
model_name="moderationqueue",
name="tags",
field=models.JSONField(
blank=True, default=list, help_text="Tags for categorization"
),
),
migrations.AlterField(
model_name="moderationqueue",
name="title",
field=models.CharField(
help_text="Brief title for the queue item", max_length=200
),
),
migrations.AlterField(
model_name="moderationqueueevent",
name="description",
field=models.TextField(
help_text="Detailed description of what needs to be done"
),
),
migrations.AlterField(
model_name="moderationqueueevent",
name="entity_id",
field=models.PositiveIntegerField(
blank=True, help_text="ID of the related entity", null=True
),
),
migrations.AlterField(
model_name="moderationqueueevent",
name="entity_preview",
field=models.JSONField(
blank=True, default=dict, help_text="Preview data for the entity"
),
),
migrations.AlterField(
model_name="moderationqueueevent",
name="entity_type",
field=models.CharField(
blank=True,
help_text="Type of entity (park, ride, user, etc.)",
max_length=50,
),
),
migrations.AlterField(
model_name="moderationqueueevent",
name="estimated_review_time",
field=models.PositiveIntegerField(
default=30, help_text="Estimated time in minutes"
),
),
migrations.AlterField(
model_name="moderationqueueevent",
name="flagged_by",
field=models.ForeignKey(
blank=True,
db_constraint=False,
null=True,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="+",
related_query_name="+",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name="moderationqueueevent",
name="item_type",
field=models.CharField(
choices=[
("CONTENT_REVIEW", "Content Review"),
("USER_REVIEW", "User Review"),
("BULK_ACTION", "Bulk Action"),
("POLICY_VIOLATION", "Policy Violation"),
("APPEAL", "Appeal"),
("OTHER", "Other"),
],
max_length=50,
),
),
migrations.AlterField(
model_name="moderationqueueevent",
name="status",
field=models.CharField(
choices=[
("PENDING", "Pending"),
("IN_PROGRESS", "In Progress"),
("COMPLETED", "Completed"),
("CANCELLED", "Cancelled"),
],
default="PENDING",
max_length=20,
),
),
migrations.AlterField(
model_name="moderationqueueevent",
name="tags",
field=models.JSONField(
blank=True, default=list, help_text="Tags for categorization"
),
),
migrations.AlterField(
model_name="moderationqueueevent",
name="title",
field=models.CharField(
help_text="Brief title for the queue item", max_length=200
),
),
migrations.AlterField(
model_name="moderationreport",
name="description",
field=models.TextField(help_text="Detailed description of the issue"),
),
migrations.AlterField(
model_name="moderationreport",
name="evidence_urls",
field=models.JSONField(
blank=True,
default=list,
help_text="URLs to evidence (screenshots, etc.)",
),
),
migrations.AlterField(
model_name="moderationreport",
name="reason",
field=models.CharField(
help_text="Brief reason for the report", max_length=200
),
),
migrations.AlterField(
model_name="moderationreport",
name="report_type",
field=models.CharField(
choices=[
("SPAM", "Spam"),
("HARASSMENT", "Harassment"),
("INAPPROPRIATE_CONTENT", "Inappropriate Content"),
("MISINFORMATION", "Misinformation"),
("COPYRIGHT", "Copyright Violation"),
("PRIVACY", "Privacy Violation"),
("HATE_SPEECH", "Hate Speech"),
("VIOLENCE", "Violence or Threats"),
("OTHER", "Other"),
],
max_length=50,
),
),
migrations.AlterField(
model_name="moderationreport",
name="reported_entity_id",
field=models.PositiveIntegerField(
help_text="ID of the entity being reported"
),
),
migrations.AlterField(
model_name="moderationreport",
name="reported_entity_type",
field=models.CharField(
help_text="Type of entity being reported (park, ride, user, etc.)",
max_length=50,
),
),
migrations.AlterField(
model_name="moderationreport",
name="resolution_action",
field=models.CharField(
blank=True,
default=django.utils.timezone.now,
help_text="Action taken to resolve",
max_length=100,
),
preserve_default=False,
),
migrations.AlterField(
model_name="moderationreport",
name="resolution_notes",
field=models.TextField(blank=True, help_text="Notes about the resolution"),
),
migrations.AlterField(
model_name="moderationreport",
name="status",
field=models.CharField(
choices=[
("PENDING", "Pending Review"),
("UNDER_REVIEW", "Under Review"),
("RESOLVED", "Resolved"),
("DISMISSED", "Dismissed"),
],
default="PENDING",
max_length=20,
),
),
migrations.AlterField(
model_name="moderationreportevent",
name="description",
field=models.TextField(help_text="Detailed description of the issue"),
),
migrations.AlterField(
model_name="moderationreportevent",
name="evidence_urls",
field=models.JSONField(
blank=True,
default=list,
help_text="URLs to evidence (screenshots, etc.)",
),
),
migrations.AlterField(
model_name="moderationreportevent",
name="reason",
field=models.CharField(
help_text="Brief reason for the report", max_length=200
),
),
migrations.AlterField(
model_name="moderationreportevent",
name="report_type",
field=models.CharField(
choices=[
("SPAM", "Spam"),
("HARASSMENT", "Harassment"),
("INAPPROPRIATE_CONTENT", "Inappropriate Content"),
("MISINFORMATION", "Misinformation"),
("COPYRIGHT", "Copyright Violation"),
("PRIVACY", "Privacy Violation"),
("HATE_SPEECH", "Hate Speech"),
("VIOLENCE", "Violence or Threats"),
("OTHER", "Other"),
],
max_length=50,
),
),
migrations.AlterField(
model_name="moderationreportevent",
name="reported_entity_id",
field=models.PositiveIntegerField(
help_text="ID of the entity being reported"
),
),
migrations.AlterField(
model_name="moderationreportevent",
name="reported_entity_type",
field=models.CharField(
help_text="Type of entity being reported (park, ride, user, etc.)",
max_length=50,
),
),
migrations.AlterField(
model_name="moderationreportevent",
name="resolution_action",
field=models.CharField(
blank=True,
default=django.utils.timezone.now,
help_text="Action taken to resolve",
max_length=100,
),
preserve_default=False,
),
migrations.AlterField(
model_name="moderationreportevent",
name="resolution_notes",
field=models.TextField(blank=True, help_text="Notes about the resolution"),
),
migrations.AlterField(
model_name="moderationreportevent",
name="status",
field=models.CharField(
choices=[
("PENDING", "Pending Review"),
("UNDER_REVIEW", "Under Review"),
("RESOLVED", "Resolved"),
("DISMISSED", "Dismissed"),
],
default="PENDING",
max_length=20,
),
),
migrations.AddIndex(
model_name="bulkoperation",
index=models.Index(
fields=["schedule_for"], name="moderation__schedul_350704_idx"
),
),
migrations.AddIndex(
model_name="bulkoperation",
index=models.Index(
fields=["created_at"], name="moderation__created_b705f4_idx"
),
),
migrations.AddIndex(
model_name="moderationaction",
index=models.Index(
fields=["moderator"], name="moderation__moderat_1c19b0_idx"
),
),
migrations.AddIndex(
model_name="moderationaction",
index=models.Index(
fields=["created_at"], name="moderation__created_6378e6_idx"
),
),
migrations.AddIndex(
model_name="moderationqueue",
index=models.Index(
fields=["created_at"], name="moderation__created_fe6dd0_idx"
),
),
migrations.AddIndex(
model_name="moderationreport",
index=models.Index(
fields=["reported_by"], name="moderation__reporte_81af56_idx"
),
),
migrations.AddIndex(
model_name="moderationreport",
index=models.Index(
fields=["created_at"], name="moderation__created_ae337c_idx"
),
),
pgtrigger.migrations.AddTrigger(
model_name="moderationqueue",
trigger=pgtrigger.compiler.Trigger(
name="insert_insert",
sql=pgtrigger.compiler.UpsertTriggerSql(
func='INSERT INTO "moderation_moderationqueueevent" ("assigned_at", "assigned_to_id", "content_type_id", "created_at", "description", "entity_id", "entity_preview", "entity_type", "estimated_review_time", "flagged_by_id", "id", "item_type", "pgh_context_id", "pgh_created_at", "pgh_label", "pgh_obj_id", "priority", "related_report_id", "status", "tags", "title", "updated_at") VALUES (NEW."assigned_at", NEW."assigned_to_id", NEW."content_type_id", NEW."created_at", NEW."description", NEW."entity_id", NEW."entity_preview", NEW."entity_type", NEW."estimated_review_time", NEW."flagged_by_id", NEW."id", NEW."item_type", _pgh_attach_context(), NOW(), \'insert\', NEW."id", NEW."priority", NEW."related_report_id", NEW."status", NEW."tags", NEW."title", NEW."updated_at"); RETURN NULL;',
hash="55993d8cb4981feed7b3febde9e87989481a8a34",
operation="INSERT",
pgid="pgtrigger_insert_insert_cf9cb",
table="moderation_moderationqueue",
when="AFTER",
),
),
),
pgtrigger.migrations.AddTrigger(
model_name="moderationqueue",
trigger=pgtrigger.compiler.Trigger(
name="update_update",
sql=pgtrigger.compiler.UpsertTriggerSql(
condition="WHEN (OLD.* IS DISTINCT FROM NEW.*)",
func='INSERT INTO "moderation_moderationqueueevent" ("assigned_at", "assigned_to_id", "content_type_id", "created_at", "description", "entity_id", "entity_preview", "entity_type", "estimated_review_time", "flagged_by_id", "id", "item_type", "pgh_context_id", "pgh_created_at", "pgh_label", "pgh_obj_id", "priority", "related_report_id", "status", "tags", "title", "updated_at") VALUES (NEW."assigned_at", NEW."assigned_to_id", NEW."content_type_id", NEW."created_at", NEW."description", NEW."entity_id", NEW."entity_preview", NEW."entity_type", NEW."estimated_review_time", NEW."flagged_by_id", NEW."id", NEW."item_type", _pgh_attach_context(), NOW(), \'update\', NEW."id", NEW."priority", NEW."related_report_id", NEW."status", NEW."tags", NEW."title", NEW."updated_at"); RETURN NULL;',
hash="8da070419fd1efd43bfb272a431392b6244a7739",
operation="UPDATE",
pgid="pgtrigger_update_update_3b3aa",
table="moderation_moderationqueue",
when="AFTER",
),
),
),
]

View File

@@ -1,75 +0,0 @@
# Generated by Django 5.2.5 on 2025-08-30 21:41
import django.db.models.deletion
import pgtrigger.compiler
import pgtrigger.migrations
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("django_cloudflareimages_toolkit", "0001_initial"),
("moderation", "0004_alter_moderationqueue_options_and_more"),
]
operations = [
pgtrigger.migrations.RemoveTrigger(
model_name="photosubmission",
name="insert_insert",
),
pgtrigger.migrations.RemoveTrigger(
model_name="photosubmission",
name="update_update",
),
migrations.AlterField(
model_name="photosubmission",
name="photo",
field=models.ForeignKey(
help_text="Photo submission stored on Cloudflare Images",
on_delete=django.db.models.deletion.CASCADE,
to="django_cloudflareimages_toolkit.cloudflareimage",
),
),
migrations.AlterField(
model_name="photosubmissionevent",
name="photo",
field=models.ForeignKey(
db_constraint=False,
help_text="Photo submission stored on Cloudflare Images",
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="+",
related_query_name="+",
to="django_cloudflareimages_toolkit.cloudflareimage",
),
),
pgtrigger.migrations.AddTrigger(
model_name="photosubmission",
trigger=pgtrigger.compiler.Trigger(
name="insert_insert",
sql=pgtrigger.compiler.UpsertTriggerSql(
func='INSERT INTO "moderation_photosubmissionevent" ("caption", "content_type_id", "created_at", "date_taken", "handled_at", "handled_by_id", "id", "notes", "object_id", "pgh_context_id", "pgh_created_at", "pgh_label", "pgh_obj_id", "photo_id", "status", "updated_at", "user_id") VALUES (NEW."caption", NEW."content_type_id", NEW."created_at", NEW."date_taken", NEW."handled_at", NEW."handled_by_id", NEW."id", NEW."notes", NEW."object_id", _pgh_attach_context(), NOW(), \'insert\', NEW."id", NEW."photo_id", NEW."status", NEW."updated_at", NEW."user_id"); RETURN NULL;',
hash="198c1500ffe6dd50f9fc4bc7bbfbc1c392f1faa6",
operation="INSERT",
pgid="pgtrigger_insert_insert_62865",
table="moderation_photosubmission",
when="AFTER",
),
),
),
pgtrigger.migrations.AddTrigger(
model_name="photosubmission",
trigger=pgtrigger.compiler.Trigger(
name="update_update",
sql=pgtrigger.compiler.UpsertTriggerSql(
condition="WHEN (OLD.* IS DISTINCT FROM NEW.*)",
func='INSERT INTO "moderation_photosubmissionevent" ("caption", "content_type_id", "created_at", "date_taken", "handled_at", "handled_by_id", "id", "notes", "object_id", "pgh_context_id", "pgh_created_at", "pgh_label", "pgh_obj_id", "photo_id", "status", "updated_at", "user_id") VALUES (NEW."caption", NEW."content_type_id", NEW."created_at", NEW."date_taken", NEW."handled_at", NEW."handled_by_id", NEW."id", NEW."notes", NEW."object_id", _pgh_attach_context(), NOW(), \'update\', NEW."id", NEW."photo_id", NEW."status", NEW."updated_at", NEW."user_id"); RETURN NULL;',
hash="4757ec44aa21ca0567f894df0c2a5db7d39ec98f",
operation="UPDATE",
pgid="pgtrigger_update_update_9c311",
table="moderation_photosubmission",
when="AFTER",
),
),
),
]

View File

@@ -1,470 +0,0 @@
# Generated by Django 5.2.5 on 2025-09-15 17:35
import apps.core.choices.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("moderation", "0005_remove_photosubmission_insert_insert_and_more"),
]
operations = [
migrations.AlterField(
model_name="bulkoperation",
name="operation_type",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="bulk_operation_types",
choices=[
("UPDATE_PARKS", "Update Parks"),
("UPDATE_RIDES", "Update Rides"),
("IMPORT_DATA", "Import Data"),
("EXPORT_DATA", "Export Data"),
("MODERATE_CONTENT", "Moderate Content"),
("USER_ACTIONS", "User Actions"),
("CLEANUP", "Cleanup"),
("OTHER", "Other"),
],
domain="moderation",
max_length=50,
),
),
migrations.AlterField(
model_name="bulkoperation",
name="priority",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="priority_levels",
choices=[
("LOW", "Low"),
("MEDIUM", "Medium"),
("HIGH", "High"),
("URGENT", "Urgent"),
],
default="MEDIUM",
domain="moderation",
max_length=10,
),
),
migrations.AlterField(
model_name="bulkoperation",
name="status",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="bulk_operation_statuses",
choices=[
("PENDING", "Pending"),
("RUNNING", "Running"),
("COMPLETED", "Completed"),
("FAILED", "Failed"),
("CANCELLED", "Cancelled"),
],
default="PENDING",
domain="moderation",
max_length=20,
),
),
migrations.AlterField(
model_name="bulkoperationevent",
name="operation_type",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="bulk_operation_types",
choices=[
("UPDATE_PARKS", "Update Parks"),
("UPDATE_RIDES", "Update Rides"),
("IMPORT_DATA", "Import Data"),
("EXPORT_DATA", "Export Data"),
("MODERATE_CONTENT", "Moderate Content"),
("USER_ACTIONS", "User Actions"),
("CLEANUP", "Cleanup"),
("OTHER", "Other"),
],
domain="moderation",
max_length=50,
),
),
migrations.AlterField(
model_name="bulkoperationevent",
name="priority",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="priority_levels",
choices=[
("LOW", "Low"),
("MEDIUM", "Medium"),
("HIGH", "High"),
("URGENT", "Urgent"),
],
default="MEDIUM",
domain="moderation",
max_length=10,
),
),
migrations.AlterField(
model_name="bulkoperationevent",
name="status",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="bulk_operation_statuses",
choices=[
("PENDING", "Pending"),
("RUNNING", "Running"),
("COMPLETED", "Completed"),
("FAILED", "Failed"),
("CANCELLED", "Cancelled"),
],
default="PENDING",
domain="moderation",
max_length=20,
),
),
migrations.AlterField(
model_name="editsubmission",
name="status",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="edit_submission_statuses",
choices=[
("PENDING", "Pending"),
("APPROVED", "Approved"),
("REJECTED", "Rejected"),
("ESCALATED", "Escalated"),
],
default="PENDING",
domain="moderation",
max_length=20,
),
),
migrations.AlterField(
model_name="editsubmission",
name="submission_type",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="submission_types",
choices=[("EDIT", "Edit Existing"), ("CREATE", "Create New")],
default="EDIT",
domain="moderation",
max_length=10,
),
),
migrations.AlterField(
model_name="editsubmissionevent",
name="status",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="edit_submission_statuses",
choices=[
("PENDING", "Pending"),
("APPROVED", "Approved"),
("REJECTED", "Rejected"),
("ESCALATED", "Escalated"),
],
default="PENDING",
domain="moderation",
max_length=20,
),
),
migrations.AlterField(
model_name="editsubmissionevent",
name="submission_type",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="submission_types",
choices=[("EDIT", "Edit Existing"), ("CREATE", "Create New")],
default="EDIT",
domain="moderation",
max_length=10,
),
),
migrations.AlterField(
model_name="moderationaction",
name="action_type",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="moderation_action_types",
choices=[
("WARNING", "Warning"),
("USER_SUSPENSION", "User Suspension"),
("USER_BAN", "User Ban"),
("CONTENT_REMOVAL", "Content Removal"),
("CONTENT_EDIT", "Content Edit"),
("CONTENT_RESTRICTION", "Content Restriction"),
("ACCOUNT_RESTRICTION", "Account Restriction"),
("OTHER", "Other"),
],
domain="moderation",
max_length=50,
),
),
migrations.AlterField(
model_name="moderationactionevent",
name="action_type",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="moderation_action_types",
choices=[
("WARNING", "Warning"),
("USER_SUSPENSION", "User Suspension"),
("USER_BAN", "User Ban"),
("CONTENT_REMOVAL", "Content Removal"),
("CONTENT_EDIT", "Content Edit"),
("CONTENT_RESTRICTION", "Content Restriction"),
("ACCOUNT_RESTRICTION", "Account Restriction"),
("OTHER", "Other"),
],
domain="moderation",
max_length=50,
),
),
migrations.AlterField(
model_name="moderationqueue",
name="item_type",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="queue_item_types",
choices=[
("CONTENT_REVIEW", "Content Review"),
("USER_REVIEW", "User Review"),
("BULK_ACTION", "Bulk Action"),
("POLICY_VIOLATION", "Policy Violation"),
("APPEAL", "Appeal"),
("OTHER", "Other"),
],
domain="moderation",
max_length=50,
),
),
migrations.AlterField(
model_name="moderationqueue",
name="priority",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="priority_levels",
choices=[
("LOW", "Low"),
("MEDIUM", "Medium"),
("HIGH", "High"),
("URGENT", "Urgent"),
],
default="MEDIUM",
domain="moderation",
max_length=10,
),
),
migrations.AlterField(
model_name="moderationqueue",
name="status",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="moderation_queue_statuses",
choices=[
("PENDING", "Pending"),
("IN_PROGRESS", "In Progress"),
("COMPLETED", "Completed"),
("CANCELLED", "Cancelled"),
],
default="PENDING",
domain="moderation",
max_length=20,
),
),
migrations.AlterField(
model_name="moderationqueueevent",
name="item_type",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="queue_item_types",
choices=[
("CONTENT_REVIEW", "Content Review"),
("USER_REVIEW", "User Review"),
("BULK_ACTION", "Bulk Action"),
("POLICY_VIOLATION", "Policy Violation"),
("APPEAL", "Appeal"),
("OTHER", "Other"),
],
domain="moderation",
max_length=50,
),
),
migrations.AlterField(
model_name="moderationqueueevent",
name="priority",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="priority_levels",
choices=[
("LOW", "Low"),
("MEDIUM", "Medium"),
("HIGH", "High"),
("URGENT", "Urgent"),
],
default="MEDIUM",
domain="moderation",
max_length=10,
),
),
migrations.AlterField(
model_name="moderationqueueevent",
name="status",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="moderation_queue_statuses",
choices=[
("PENDING", "Pending"),
("IN_PROGRESS", "In Progress"),
("COMPLETED", "Completed"),
("CANCELLED", "Cancelled"),
],
default="PENDING",
domain="moderation",
max_length=20,
),
),
migrations.AlterField(
model_name="moderationreport",
name="priority",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="priority_levels",
choices=[
("LOW", "Low"),
("MEDIUM", "Medium"),
("HIGH", "High"),
("URGENT", "Urgent"),
],
default="MEDIUM",
domain="moderation",
max_length=10,
),
),
migrations.AlterField(
model_name="moderationreport",
name="report_type",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="report_types",
choices=[
("SPAM", "Spam"),
("HARASSMENT", "Harassment"),
("INAPPROPRIATE_CONTENT", "Inappropriate Content"),
("MISINFORMATION", "Misinformation"),
("COPYRIGHT", "Copyright Violation"),
("PRIVACY", "Privacy Violation"),
("HATE_SPEECH", "Hate Speech"),
("VIOLENCE", "Violence or Threats"),
("OTHER", "Other"),
],
domain="moderation",
max_length=50,
),
),
migrations.AlterField(
model_name="moderationreport",
name="status",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="moderation_report_statuses",
choices=[
("PENDING", "Pending Review"),
("UNDER_REVIEW", "Under Review"),
("RESOLVED", "Resolved"),
("DISMISSED", "Dismissed"),
],
default="PENDING",
domain="moderation",
max_length=20,
),
),
migrations.AlterField(
model_name="moderationreportevent",
name="priority",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="priority_levels",
choices=[
("LOW", "Low"),
("MEDIUM", "Medium"),
("HIGH", "High"),
("URGENT", "Urgent"),
],
default="MEDIUM",
domain="moderation",
max_length=10,
),
),
migrations.AlterField(
model_name="moderationreportevent",
name="report_type",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="report_types",
choices=[
("SPAM", "Spam"),
("HARASSMENT", "Harassment"),
("INAPPROPRIATE_CONTENT", "Inappropriate Content"),
("MISINFORMATION", "Misinformation"),
("COPYRIGHT", "Copyright Violation"),
("PRIVACY", "Privacy Violation"),
("HATE_SPEECH", "Hate Speech"),
("VIOLENCE", "Violence or Threats"),
("OTHER", "Other"),
],
domain="moderation",
max_length=50,
),
),
migrations.AlterField(
model_name="moderationreportevent",
name="status",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="moderation_report_statuses",
choices=[
("PENDING", "Pending Review"),
("UNDER_REVIEW", "Under Review"),
("RESOLVED", "Resolved"),
("DISMISSED", "Dismissed"),
],
default="PENDING",
domain="moderation",
max_length=20,
),
),
migrations.AlterField(
model_name="photosubmission",
name="status",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="photo_submission_statuses",
choices=[
("PENDING", "Pending"),
("APPROVED", "Approved"),
("REJECTED", "Rejected"),
("ESCALATED", "Escalated"),
],
default="PENDING",
domain="moderation",
max_length=20,
),
),
migrations.AlterField(
model_name="photosubmissionevent",
name="status",
field=apps.core.choices.fields.RichChoiceField(
allow_deprecated=False,
choice_group="photo_submission_statuses",
choices=[
("PENDING", "Pending"),
("APPROVED", "Approved"),
("REJECTED", "Rejected"),
("ESCALATED", "Escalated"),
],
default="PENDING",
domain="moderation",
max_length=20,
),
),
]