Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-26 08:40:22

0001 # Generated by Django 5.2.12 on 2026-06-17 21:40
0002 
0003 from django.db import migrations, models
0004 
0005 
0006 class Migration(migrations.Migration):
0007 
0008     dependencies = [
0009         ('monitor_app', '0036_epicprod_inventory'),
0010     ]
0011 
0012     operations = [
0013         migrations.CreateModel(
0014             name='SystemStatus',
0015             fields=[
0016                 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
0017                 ('name', models.CharField(max_length=120, unique=True)),
0018                 ('category', models.CharField(db_index=True, max_length=80)),
0019                 ('status', models.CharField(choices=[('ok', 'OK'), ('warning', 'Warning'), ('error', 'Error'), ('unknown', 'Unknown')], db_index=True, default='unknown', max_length=20)),
0020                 ('summary', models.TextField(blank=True, default='')),
0021                 ('data', models.JSONField(blank=True, default=dict)),
0022                 ('checked_at', models.DateTimeField(blank=True, db_index=True, null=True)),
0023                 ('created_at', models.DateTimeField(auto_now_add=True)),
0024                 ('updated_at', models.DateTimeField(auto_now=True)),
0025             ],
0026             options={
0027                 'db_table': 'swf_system_status',
0028                 'ordering': ['category', 'name'],
0029                 'indexes': [models.Index(fields=['category', 'status'], name='swf_system__categor_f47d11_idx'), models.Index(fields=['status', 'checked_at'], name='swf_system__status_a7441e_idx')],
0030             },
0031         ),
0032         migrations.CreateModel(
0033             name='SystemStatusHistory',
0034             fields=[
0035                 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
0036                 ('name', models.CharField(db_index=True, max_length=120)),
0037                 ('category', models.CharField(db_index=True, max_length=80)),
0038                 ('status', models.CharField(db_index=True, max_length=20)),
0039                 ('summary', models.TextField(blank=True, default='')),
0040                 ('data', models.JSONField(blank=True, default=dict)),
0041                 ('checked_at', models.DateTimeField(db_index=True)),
0042                 ('created_at', models.DateTimeField(auto_now_add=True)),
0043             ],
0044             options={
0045                 'db_table': 'swf_system_status_history',
0046                 'ordering': ['-checked_at', 'name'],
0047                 'indexes': [models.Index(fields=['name', '-checked_at'], name='swf_system__name_fc3146_idx'), models.Index(fields=['category', '-checked_at'], name='swf_system__categor_fc20ee_idx'), models.Index(fields=['status', '-checked_at'], name='swf_system__status_ab1756_idx')],
0048             },
0049         ),
0050     ]