add memberFederated model
This commit is contained in:
parent
73d478f517
commit
caf2606fd9
60
dpp/migrations/0003_memberfederated_institution_and_more.py
Normal file
60
dpp/migrations/0003_memberfederated_institution_and_more.py
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
# Generated by Django 5.0.6 on 2024-11-20 10:51
|
||||||
|
|
||||||
|
import django.db.models.deletion
|
||||||
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("dpp", "0002_memberfederated"),
|
||||||
|
("user", "0001_initial"),
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="memberfederated",
|
||||||
|
name="institution",
|
||||||
|
field=models.ForeignKey(
|
||||||
|
blank=True,
|
||||||
|
null=True,
|
||||||
|
on_delete=django.db.models.deletion.SET_NULL,
|
||||||
|
to="user.institution",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="memberfederated",
|
||||||
|
name="client_id",
|
||||||
|
field=models.CharField(max_length=256, null=True),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="memberfederated",
|
||||||
|
name="client_secret",
|
||||||
|
field=models.CharField(max_length=256, null=True),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name="UserDpp",
|
||||||
|
fields=[
|
||||||
|
(
|
||||||
|
"id",
|
||||||
|
models.BigAutoField(
|
||||||
|
auto_created=True,
|
||||||
|
primary_key=True,
|
||||||
|
serialize=False,
|
||||||
|
verbose_name="ID",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
("roles_dlt", models.TextField()),
|
||||||
|
("api_keys_dlt", models.TextField()),
|
||||||
|
(
|
||||||
|
"user",
|
||||||
|
models.ForeignKey(
|
||||||
|
on_delete=django.db.models.deletion.CASCADE,
|
||||||
|
to=settings.AUTH_USER_MODEL,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
|
@ -20,7 +20,7 @@ class MemberFederated(models.Model):
|
||||||
domain = models.CharField(max_length=STR_EXTEND_SIZE)
|
domain = models.CharField(max_length=STR_EXTEND_SIZE)
|
||||||
# This client_id and client_secret is used for connected to this domain as
|
# This client_id and client_secret is used for connected to this domain as
|
||||||
# a client and this domain then is the server of auth
|
# a client and this domain then is the server of auth
|
||||||
client_id = models.CharField(max_length=STR_EXTEND_SIZE. null=True)
|
client_id = models.CharField(max_length=STR_EXTEND_SIZE, null=True)
|
||||||
client_secret = models.CharField(max_length=STR_EXTEND_SIZE, null=True)
|
client_secret = models.CharField(max_length=STR_EXTEND_SIZE, null=True)
|
||||||
institution = models.ForeignKey(
|
institution = models.ForeignKey(
|
||||||
Institution, on_delete=models.SET_NULL, null=True, blank=True)
|
Institution, on_delete=models.SET_NULL, null=True, blank=True)
|
||||||
|
|
Loading…
Reference in a new issue