aboutsummaryrefslogtreecommitdiff
path: root/rrd/migrations/0001_initial.py
blob: c4bbee8be6de8a33b254370b699d27428a50aed8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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,
            },
        ),
    ]