# Generated by Django 3.2.21 on 2023-11-21 15:45

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


class Migration(migrations.Migration):
    dependencies = [
        ("database", "0139_rename_created_by_view_owned_by"),
        ("core", "0078_usersource"),
        ("baserow_enterprise", "0022_workspace_audit_log"),
    ]

    operations = [
        migrations.CreateModel(
            name="LocalBaserowUserSource",
            fields=[
                (
                    "usersource_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="core.usersource",
                    ),
                ),
                (
                    "email_field",
                    models.ForeignKey(
                        help_text="The Baserow field that contains the email value for the user.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="+",
                        to="database.field",
                    ),
                ),
                (
                    "name_field",
                    models.ForeignKey(
                        help_text="The Baserow field that contains the name of the user.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="+",
                        to="database.field",
                    ),
                ),
                (
                    "table",
                    models.ForeignKey(
                        default=None,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="database.table",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
            bases=("core.usersource",),
        ),
    ]
