IdHub/idhub/migrations/0004_userrol.py
Cayo Puigdefabregas fcd1316872 add userRol
2023-10-17 17:42:48 +02:00

46 lines
1.3 KiB
Python

# Generated by Django 4.2.5 on 2023-10-17 14:24
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("idhub", "0003_service"),
]
operations = [
migrations.CreateModel(
name="UserRol",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"service",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="users",
to="idhub.service",
),
),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="roles",
to=settings.AUTH_USER_MODEL,
),
),
],
),
]