# Generated by Django 3.2.3 on 2021-06-23 00:31

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AboutPage',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=600)),
                ('html', models.TextField()),
                ('css', models.TextField(blank=True, null=True)),
            ],
            options={
                'verbose_name': 'About Page',
                'verbose_name_plural': 'About Page',
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': 'Category',
                'verbose_name_plural': 'Categories',
            },
        ),
        migrations.CreateModel(
            name='ExternalDatabaseConnectionCredentials',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('host', models.CharField(max_length=18)),
                ('dbname', models.CharField(max_length=150)),
                ('user', models.CharField(max_length=150)),
                ('password', models.CharField(max_length=150)),
                ('created_at', models.DateTimeField()),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'verbose_name': 'External DB Connection Credential',
                'verbose_name_plural': 'External DB Connection Credentials',
            },
        ),
        migrations.CreateModel(
            name='SiteSetting',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=150)),
                ('category', models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, to='visualization.category')),
            ],
            options={
                'verbose_name': 'Site Setting',
                'verbose_name_plural': 'Site Setting',
            },
        ),
        migrations.CreateModel(
            name='Navbar',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bg_color', models.CharField(default='#343a40', max_length=30)),
                ('site_setting', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='visualization.sitesetting')),
            ],
            options={
                'verbose_name': 'Navbar',
                'verbose_name_plural': 'Navbars',
            },
        ),
        migrations.CreateModel(
            name='Logos',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('side_text', models.CharField(blank=True, max_length=150, null=True)),
                ('image', models.ImageField(blank=True, null=True, upload_to='Logos')),
                ('width', models.CharField(default='100%', max_length=10)),
                ('height', models.CharField(default='100%', max_length=10)),
                ('alt', models.CharField(blank=True, max_length=150, null=True)),
                ('site_setting', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='visualization.sitesetting')),
            ],
            options={
                'verbose_name': 'Logo',
                'verbose_name_plural': 'Logo',
            },
        ),
        migrations.CreateModel(
            name='Graphs',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=300)),
                ('query', models.TextField(help_text='Note: inserted query must be a valid sql one.')),
                ('table', models.TextField(blank=True, null=True)),
                ('code', models.TextField(default='df.plot(ax=ax)', help_text='Note: there are 3 global variables to be used: df (pandas dataframe), fig (matplotlib figure) and ax (matplotlib axes). Naming has been given logical equivalent of the general use. They can be overriden accourding to the further manipulation of the data')),
                ('img_base64', models.TextField()),
                ('description', models.TextField(blank=True, help_text='This will help you to fastly identify graph settings', null=True)),
                ('active', models.BooleanField(default=True)),
                ('top', models.CharField(default='0px', max_length=50)),
                ('left', models.CharField(default='0px', max_length=50)),
                ('snap_tolerance', models.IntegerField(default=20, help_text='The distance after which the grahps will be magnetised to each other.')),
                ('card_width', models.CharField(default='22rem', max_length=50)),
                ('card_height', models.CharField(default='20rem', max_length=50)),
                ('category', models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, to='visualization.category')),
                ('connection', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='visualization.externaldatabaseconnectioncredentials')),
            ],
            options={
                'verbose_name': 'Graph',
            },
        ),
        migrations.CreateModel(
            name='Body',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bg_color', models.CharField(default='#fff', max_length=30)),
                ('site_setting', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='visualization.sitesetting')),
            ],
            options={
                'verbose_name': 'Body',
                'verbose_name_plural': 'Body',
            },
        ),
    ]
