tahamajs/RR / Codes /django_api /api /migrations /0001_initial.py
tahamajs's picture
download
raw
3.1 kB
# Generated by Django 6.0.4 on 2026-05-21 16:37
import uuid
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
("contenttypes", "0002_remove_content_type_name"),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name="ActivityLog",
fields=[
(
"id",
models.UUIDField(
default=uuid.uuid4,
editable=False,
primary_key=True,
serialize=False,
),
),
(
"action_type",
models.CharField(
choices=[
("create", "Created"),
("update", "Updated"),
("delete", "Deleted"),
("start", "Started"),
("stop", "Stopped"),
("complete", "Completed"),
("fail", "Failed"),
("publish", "Published"),
("share", "Shared"),
("comment", "Commented"),
("react", "Reacted"),
("export", "Exported"),
],
max_length=20,
),
),
("description", models.TextField()),
("object_id", models.CharField(blank=True, max_length=36, null=True)),
("metadata", models.JSONField(blank=True, default=dict)),
("created_at", models.DateTimeField(auto_now_add=True, db_index=True)),
(
"content_type",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.CASCADE,
to="contenttypes.contenttype",
),
),
(
"user",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"ordering": ["-created_at"],
"indexes": [
models.Index(
fields=["user", "created_at"],
name="api_activit_user_id_c1358b_idx",
),
models.Index(
fields=["action_type", "created_at"],
name="api_activit_action__4f50a3_idx",
),
],
},
),
]

Xet Storage Details

Size:
3.1 kB
·
Xet hash:
bde496edc9d65c75c70cfbf7c17cc4e8c7d6ff42c399bb40c69a4a9610f383df

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.