mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2026-01-08 17:06:17 +00:00
add WireguardStatusCache model and initial migration
This commit is contained in:
26
api/migrations/0001_initial.py
Normal file
26
api/migrations/0001_initial.py
Normal file
@@ -0,0 +1,26 @@
|
||||
# Generated by Django 5.2.9 on 2026-01-06 14:27
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='WireguardStatusCache',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('cache_type', models.CharField(choices=[('master', 'Master'), ('cluster', 'Cluster')], max_length=16)),
|
||||
('data', models.JSONField()),
|
||||
('processing_time_ms', models.PositiveIntegerField()),
|
||||
('uuid', models.UUIDField(unique=True)),
|
||||
('created', models.DateTimeField(auto_now_add=True)),
|
||||
('updated', models.DateTimeField(auto_now=True)),
|
||||
],
|
||||
),
|
||||
]
|
||||
@@ -1,3 +1,10 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
class WireguardStatusCache(models.Model):
|
||||
cache_type = models.CharField(choices=(('master', 'Master'), ('cluster', 'Cluster')), max_length=16)
|
||||
data = models.JSONField()
|
||||
processing_time_ms = models.PositiveIntegerField()
|
||||
|
||||
uuid = models.UUIDField(unique=True)
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
updated = models.DateTimeField(auto_now=True)
|
||||
@@ -46,7 +46,8 @@ INSTALLED_APPS = [
|
||||
'firewall',
|
||||
'dns',
|
||||
'vpn_invite',
|
||||
'cluster'
|
||||
'cluster',
|
||||
'api'
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
||||
Reference in New Issue
Block a user