# Generated by Django 5.0.2 on 2024-03-31 09:38

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


class Migration(migrations.Migration):

    dependencies = [
        ('module_iam', '0006_alter_appversion_version'),
    ]

    operations = [
        migrations.CreateModel(
            name='IAmPrincipalResourceLink',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('principal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='principal_resource_link_principal', to=settings.AUTH_USER_MODEL)),
                ('principal_resource', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='principal_resource_link_resource', to='module_iam.iamappresource')),
            ],
            options={
                'db_table': 'iam_principal_resource_group_link',
            },
        ),
        migrations.AddField(
            model_name='iamprincipal',
            name='principal_resource',
            field=models.ManyToManyField(related_name='principal_resources', through='module_iam.IAmPrincipalResourceLink', to='module_iam.iamappresource'),
        ),
    ]
