Skip to content

Commit

Permalink
[#233] Migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmursa-dev committed Nov 18, 2024
1 parent 6bf4398 commit cc4c101
Show file tree
Hide file tree
Showing 2 changed files with 154 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# Generated by Django 4.2.15 on 2024-11-18 14:46

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


class Migration(migrations.Migration):

dependencies = [
("klantinteracties", "0021_alter_digitaaladres_betrokkene"),
]

operations = [
migrations.CreateModel(
name="PartijIdentificatorCodeObjectType",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("uuid", models.UUIDField(default=uuid.uuid4, unique=True)),
(
"object_type",
models.CharField(
blank=True,
help_text="Object type",
max_length=255,
verbose_name="Object type",
),
),
],
),
migrations.CreateModel(
name="PartijIdentificatorCodeRegister",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("uuid", models.UUIDField(default=uuid.uuid4, unique=True)),
(
"register",
models.CharField(
blank=True, max_length=50, verbose_name="register"
),
),
(
"naam",
models.CharField(
blank=True,
help_text="Naam register",
max_length=80,
verbose_name="naam",
),
),
],
),
migrations.AlterField(
model_name="partijidentificator",
name="partij_identificator_object_id",
field=models.CharField(
help_text="Waarde van de eigenschap die het object identificeert, bijvoorbeeld: '123456788'.",
null=True,
verbose_name="object ID",
),
),
migrations.CreateModel(
name="PartijIdentificatorCodeSoortObjectId",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("uuid", models.UUIDField(default=uuid.uuid4, unique=True)),
(
"soort_object_id",
models.CharField(
blank=True,
help_text="Soort object id",
max_length=255,
verbose_name="Soort object id",
),
),
(
"object_type",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.CASCADE,
to="klantinteracties.partijidentificatorcodeobjecttype",
),
),
],
),
migrations.AddField(
model_name="partijidentificatorcodeobjecttype",
name="register",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.CASCADE,
to="klantinteracties.partijidentificatorcoderegister",
),
),
migrations.AlterField(
model_name="partijidentificator",
name="partij_identificator_code_objecttype",
field=models.ForeignKey(
help_text="Type van het object, bijvoorbeeld: 'INGESCHREVEN NATUURLIJK PERSOON'.",
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="klantinteracties.partijidentificatorcodeobjecttype",
verbose_name="objecttype",
),
),
migrations.AlterField(
model_name="partijidentificator",
name="partij_identificator_code_register",
field=models.ForeignKey(
help_text="Binnen het landschap van registers unieke omschrijving van het register waarin het object is geregistreerd, bijvoorbeeld: 'BRP'.",
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="klantinteracties.partijidentificatorcoderegister",
verbose_name="code register",
),
),
migrations.AlterField(
model_name="partijidentificator",
name="partij_identificator_code_soort_object_id",
field=models.ForeignKey(
help_text="Naam van de eigenschap die het object identificeert, bijvoorbeeld: 'Burgerservicenummer'.",
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="klantinteracties.partijidentificatorcodesoortobjectid",
verbose_name="soort object id",
),
),
]
6 changes: 0 additions & 6 deletions src/openklant/components/klantinteracties/models/partijen.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,9 @@ class PartijIdentificatorCodeRegister(models.Model):
uuid = models.UUIDField(
unique=True,
default=uuid.uuid4,
help_text=_(""),
)
register = models.CharField(
_("register"),
help_text=_(""),
max_length=50,
blank=True,
)
Expand All @@ -348,12 +346,10 @@ class PartijIdentificatorCodeObjectType(models.Model):
uuid = models.UUIDField(
unique=True,
default=uuid.uuid4,
help_text=_(""),
)
register = models.ForeignKey(
PartijIdentificatorCodeRegister,
on_delete=models.CASCADE,
help_text=_(""),
null=True,
blank=True,
)
Expand All @@ -372,12 +368,10 @@ class PartijIdentificatorCodeSoortObjectId(models.Model):
uuid = models.UUIDField(
unique=True,
default=uuid.uuid4,
help_text=_(""),
)
object_type = models.ForeignKey(
PartijIdentificatorCodeObjectType,
on_delete=models.CASCADE,
help_text=_(""),
null=True,
blank=True,
)
Expand Down

0 comments on commit cc4c101

Please sign in to comment.