notifications table

This commit is contained in:
Adolfo Gómez García 2022-02-25 03:05:27 +01:00
parent f3c2015210
commit 3f148f3bf0

View File

@ -0,0 +1,108 @@
# Generated by Django 4.0.2 on 2022-02-25 03:05
from django.db import migrations, models
import django.db.models.deletion
import uds.models.notifications
class Migration(migrations.Migration):
dependencies = [
('uds', '0043_clean_unused_config'),
]
operations = [
migrations.CreateModel(
name='Notification',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('stamp', models.DateTimeField(auto_now_add=True)),
('group', models.CharField(db_index=True, max_length=128)),
('identificator', models.CharField(db_index=True, max_length=128)),
('level', models.PositiveSmallIntegerField()),
('message', models.TextField()),
('processed', models.BooleanField(default=False)),
],
options={
'db_table': 'uds_notification',
},
),
migrations.RemoveField(
model_name='authenticator',
name='visible',
),
migrations.RemoveField(
model_name='transport',
name='nets_positive',
),
migrations.AddField(
model_name='authenticator',
name='net_filtering',
field=models.CharField(db_index=True, default='n', max_length=1),
),
migrations.AddField(
model_name='authenticator',
name='state',
field=models.CharField(db_index=True, default='v', max_length=1),
),
migrations.AddField(
model_name='metapool',
name='ha_policy',
field=models.SmallIntegerField(default=0),
),
migrations.AddField(
model_name='network',
name='authenticators',
field=models.ManyToManyField(db_table='uds_net_auths', related_name='networks', to='uds.Authenticator'),
),
migrations.AddField(
model_name='transport',
name='net_filtering',
field=models.CharField(db_index=True, default='n', max_length=1),
),
migrations.AlterField(
model_name='service',
name='token',
field=models.CharField(blank=True, default=None, max_length=64, null=True, unique=True),
),
migrations.AlterField(
model_name='tunneltoken',
name='ip',
field=models.CharField(max_length=128),
),
migrations.AlterField(
model_name='tunneltoken',
name='ip_from',
field=models.CharField(max_length=128),
),
migrations.AlterField(
model_name='userservice',
name='src_ip',
field=models.CharField(default='', max_length=128),
),
migrations.CreateModel(
name='ServiceTokenAlias',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('alias', models.CharField(max_length=64, unique=True)),
('service', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='aliases', to='uds.service')),
],
),
migrations.CreateModel(
name='NotificationProvider',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('uuid', models.CharField(default=None, max_length=50, null=True, unique=True)),
('data_type', models.CharField(max_length=128)),
('data', models.TextField(default='')),
('name', models.CharField(default='', max_length=128)),
('comments', models.CharField(default='', max_length=256)),
('enabled', models.BooleanField(default=True)),
('level', models.PositiveSmallIntegerField(default=uds.models.notifications.NotificationLevel['ERROR'])),
('tags', models.ManyToManyField(to='uds.Tag')),
],
options={
'db_table': 'uds_notify_prov',
},
),
]