# Generated by Django 4.2.17 on 2024-12-24 07:47

from django.conf import settings
from django.db import migrations, models
from django.utils import timezone


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='UserIdentity',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('strategy', models.CharField(db_index=True, max_length=24)),
                ('subject', models.CharField(editable=False, max_length=100)),
                ('profile', models.JSONField(blank=True)),
                ('created_at', models.DateTimeField(default=timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                (
                    'user',
                    models.ForeignKey(on_delete=models.CASCADE, related_name='identities', to=settings.AUTH_USER_MODEL),
                ),
            ],
            options={
                'verbose_name': 'identity',
                'verbose_name_plural': 'identities',
                'db_table': 'saas_user_identity',
                'ordering': ['strategy', 'subject'],
                'unique_together': {
                    ('strategy', 'subject'),
                    ('user', 'strategy'),
                },
            },
        ),
    ]
