# Generated by Django 5.2.3 on 2026-01-21 07:34

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


class Migration(migrations.Migration):

    dependencies = [
        ("marinerg_data_access", "0004_datasettag_dataset_tags"),
    ]

    operations = [
        migrations.CreateModel(
            name="DatasetIdAuthority",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=250)),
                ("uri", models.CharField(max_length=250)),
            ],
        ),
        migrations.CreateModel(
            name="License",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        default=django.utils.timezone.now, editable=False
                    ),
                ),
                ("updated_at", models.DateTimeField(default=django.utils.timezone.now)),
                ("full_name", models.CharField(max_length=250)),
                ("identifier", models.CharField(max_length=250)),
                ("url", models.CharField(max_length=250)),
                ("fsf_approved", models.BooleanField(default=False)),
                ("osi_approved", models.BooleanField(default=False)),
                ("vocab_url", models.CharField(max_length=250, null=True)),
                ("full_text", models.TextField(null=True)),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.AlterField(
            model_name="dataset",
            name="parent",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="children",
                to="marinerg_data_access.dataset",
            ),
        ),
        migrations.AlterField(
            model_name="dataset",
            name="id_authority",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="marinerg_data_access.datasetidauthority",
            ),
        ),
        migrations.AlterField(
            model_name="dataset",
            name="license",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to="marinerg_data_access.license",
            ),
        ),
    ]
