|
| 1 | +# Generated by Django 3.1.7 on 2021-03-04 21:42 |
| 2 | + |
| 3 | +from django.db import migrations, models |
| 4 | + |
| 5 | + |
| 6 | +class Migration(migrations.Migration): |
| 7 | + |
| 8 | + initial = True |
| 9 | + |
| 10 | + dependencies = [ |
| 11 | + ] |
| 12 | + |
| 13 | + operations = [ |
| 14 | + migrations.CreateModel( |
| 15 | + name='APILogsModel', |
| 16 | + fields=[ |
| 17 | + ('id', models.BigAutoField(primary_key=True, serialize=False)), |
| 18 | + ('added_on', models.DateTimeField()), |
| 19 | + ('api', models.CharField(help_text='API URL', max_length=512)), |
| 20 | + ('headers', models.TextField()), |
| 21 | + ('body', models.TextField()), |
| 22 | + ('method', models.CharField(db_index=True, max_length=10)), |
| 23 | + ('client_ip_address', models.CharField(max_length=50)), |
| 24 | + ('response', models.TextField()), |
| 25 | + ('status_code', models.PositiveSmallIntegerField(db_index=True, help_text='Response status code')), |
| 26 | + ('execution_time', models.DecimalField(decimal_places=5, help_text='Server execution time (Not complete response time.)', max_digits=8)), |
| 27 | + ], |
| 28 | + options={ |
| 29 | + 'verbose_name': 'API Log', |
| 30 | + 'verbose_name_plural': 'API Logs', |
| 31 | + 'db_table': 'drf_api_logs', |
| 32 | + }, |
| 33 | + ), |
| 34 | + ] |
0 commit comments