api/anomaly/migrations/0001_initial.py
# Generated by Django 3.2.1 on 2021-06-28 08:52
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Connection',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200)),
('description', models.TextField()),
('isActive', models.BooleanField(default=True)),
('file', models.JSONField(default=dict)),
],
),
migrations.CreateModel(
name='ConnectionParam',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200)),
('label', models.CharField(blank=True, max_length=200, null=True)),
('isEncrypted', models.BooleanField(default=False)),
('properties', models.TextField(blank=True, null=True)),
('file', models.JSONField(default=dict)),
],
),
migrations.CreateModel(
name='ConnectionType',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(db_index=True, max_length=200, unique=True)),
('label', models.CharField(blank=True, max_length=200, null=True)),
],
),
migrations.CreateModel(
name='Dataset',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=500)),
('sql', models.TextField(blank=True, null=True)),
('connection', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='anomaly.connection')),
],
),
migrations.CreateModel(
name='ConnectionParamValue',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('value', models.TextField()),
('connection', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cpvc', to='anomaly.connection')),
('connectionParam', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cpvcp', to='anomaly.connectionparam')),
],
),
migrations.AddField(
model_name='connectionparam',
name='connectionType',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='connectionTypeParam', to='anomaly.connectiontype'),
),
migrations.AddField(
model_name='connection',
name='connectionType',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='connectionTypeConnection', to='anomaly.connectiontype'),
),
]