# Generated by Django 5.1.4 on 2025-03-03 12:27

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


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="SupersetInstance",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "address",
                    models.CharField(
                        max_length=250,
                        unique=True,
                        verbose_name="adresse de l'instance Superset",
                    ),
                ),
                (
                    "username",
                    models.CharField(
                        default="superset_api",
                        max_length=250,
                        verbose_name="nom d'utilisateur",
                    ),
                ),
                (
                    "password",
                    models.CharField(
                        blank=True,
                        max_length=128,
                        null=True,
                        verbose_name="mot de passe",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="SupersetDashboard",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "integration_id",
                    models.CharField(
                        max_length=50,
                        unique=True,
                        verbose_name="ID d'intégration",
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        max_length=250, unique=True, verbose_name="Nom"
                    ),
                ),
                (
                    "comment",
                    models.TextField(
                        blank=True, null=True, verbose_name="Commentaire"
                    ),
                ),
                (
                    "superset_link",
                    models.CharField(
                        blank=True,
                        max_length=500,
                        null=True,
                        verbose_name="Lien vers le dashboard dans Superset",
                    ),
                ),
                (
                    "domain",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="superset_integration.supersetinstance",
                    ),
                ),
            ],
        ),
    ]
