55 lines
1.6 KiB
Python
55 lines
1.6 KiB
Python
|
# Generated by Django 3.2.11 on 2022-01-12 01:10
|
||
|
|
||
|
import django.db.models.deletion
|
||
|
from django.conf import settings
|
||
|
from django.db import migrations, models
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
initial = True
|
||
|
|
||
|
dependencies = [
|
||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name="Event",
|
||
|
fields=[
|
||
|
(
|
||
|
"id",
|
||
|
models.AutoField(
|
||
|
auto_created=True,
|
||
|
primary_key=True,
|
||
|
serialize=False,
|
||
|
verbose_name="ID",
|
||
|
),
|
||
|
),
|
||
|
("message", models.TextField(default="")),
|
||
|
(
|
||
|
"level",
|
||
|
models.CharField(
|
||
|
choices=[
|
||
|
("info", "INFO"),
|
||
|
("warning", "WARNING"),
|
||
|
("error", "ERROR"),
|
||
|
],
|
||
|
max_length=7,
|
||
|
),
|
||
|
),
|
||
|
("timestamp", models.DateTimeField(auto_now_add=True)),
|
||
|
("data", models.JSONField(default=dict)),
|
||
|
(
|
||
|
"user",
|
||
|
models.ForeignKey(
|
||
|
null=True,
|
||
|
on_delete=django.db.models.deletion.SET_NULL,
|
||
|
related_name="events",
|
||
|
to=settings.AUTH_USER_MODEL,
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
]
|