File indexing completed on 2026-04-27 07:41:42
0001
0002
0003 from django.db import migrations, models
0004
0005
0006 class Migration(migrations.Migration):
0007
0008 dependencies = [
0009 ("monitor_app", "0003_systemagent_delete_monitoreditem"),
0010 ]
0011
0012 operations = [
0013 migrations.CreateModel(
0014 name="AppLog",
0015 fields=[
0016 (
0017 "id",
0018 models.BigAutoField(
0019 auto_created=True,
0020 primary_key=True,
0021 serialize=False,
0022 verbose_name="ID",
0023 ),
0024 ),
0025 ("app_name", models.CharField(db_index=True, max_length=100)),
0026 ("instance_name", models.CharField(db_index=True, max_length=100)),
0027 ("timestamp", models.DateTimeField(db_index=True)),
0028 ("level_name", models.CharField(max_length=50)),
0029 ("message", models.TextField()),
0030 ("module", models.CharField(max_length=255)),
0031 ("func_name", models.CharField(max_length=255)),
0032 ("line_no", models.IntegerField()),
0033 ("process", models.IntegerField()),
0034 ("thread", models.BigIntegerField()),
0035 ("extra_data", models.JSONField(blank=True, null=True)),
0036 ],
0037 options={
0038 "verbose_name_plural": "App Logs",
0039 "ordering": ["-timestamp"],
0040 "indexes": [
0041 models.Index(
0042 fields=["-timestamp", "app_name", "instance_name"],
0043 name="swf_timesta_98115a_idx",
0044 )
0045 ],
0046 },
0047 ),
0048 ]