diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2023-12-08 15:11:51 +0100 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2023-12-29 07:29:15 +0100 |
commit | c9c3ac00c1a27ff4bcdb0733789a94c738c35c93 (patch) | |
tree | e3065ad59a87c4c01f136a19efda31587d5ae8b8 /rrd/migrations/0001_initial.py | |
parent | 0195aa4ce2010061b42bacd0b3e13d88007ffacc (diff) |
Add RRD-related models
Diffstat (limited to 'rrd/migrations/0001_initial.py')
-rw-r--r-- | rrd/migrations/0001_initial.py | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/rrd/migrations/0001_initial.py b/rrd/migrations/0001_initial.py new file mode 100644 index 0000000..c4bbee8 --- /dev/null +++ b/rrd/migrations/0001_initial.py @@ -0,0 +1,69 @@ +# Generated by Django 3.2.21 on 2023-12-08 13:48 + +from django.conf import settings +from django.db import migrations, models +import pathlib + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('auth', '0012_alter_user_first_name_max_length'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='DataSource', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('topic', models.CharField(max_length=512)), + ('path', models.FilePathField(max_length=512, path=pathlib.PurePosixPath('/home/valhalla/projects/software/kerbana/django-kerbana/../data/rrd'), recursive=True)), + ('rrd_config', models.TextField()), + ('active', models.BooleanField(default=True)), + ('groups_read', models.ManyToManyField(related_name='datasource_read', to='auth.Group')), + ('groups_write', models.ManyToManyField(related_name='datasource_write', to='auth.Group')), + ('users_read', models.ManyToManyField(related_name='datasource_read', to=settings.AUTH_USER_MODEL)), + ('users_write', models.ManyToManyField(related_name='datasource_write', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Graph', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=64)), + ('path', models.FilePathField(max_length=512, path=pathlib.PurePosixPath('/home/valhalla/projects/software/kerbana/django-kerbana/../data/graph'), recursive=True)), + ('rrd_config', models.TextField()), + ('data_sources', models.ManyToManyField(to='rrd.DataSource')), + ('groups_read', models.ManyToManyField(related_name='graph_read', to='auth.Group')), + ('groups_write', models.ManyToManyField(related_name='graph_write', to='auth.Group')), + ('users_read', models.ManyToManyField(related_name='graph_read', to=settings.AUTH_USER_MODEL)), + ('users_write', models.ManyToManyField(related_name='graph_write', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Dashboard', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=64)), + ('template', models.TextField()), + ('data_sources', models.ManyToManyField(to='rrd.DataSource')), + ('graphs', models.ManyToManyField(to='rrd.Graph')), + ('groups_read', models.ManyToManyField(related_name='dashboard_read', to='auth.Group')), + ('groups_write', models.ManyToManyField(related_name='dashboard_write', to='auth.Group')), + ('users_read', models.ManyToManyField(related_name='dashboard_read', to=settings.AUTH_USER_MODEL)), + ('users_write', models.ManyToManyField(related_name='dashboard_write', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'abstract': False, + }, + ), + ] |