chore: update migrations

This commit is contained in:
Alexis Métaireau 2024-02-22 15:08:36 +01:00
parent d18a32b5d3
commit f869d77f2c
2 changed files with 4 additions and 1 deletions

View file

@ -25,7 +25,9 @@ class Migration(migrations.Migration):
field=models.UUIDField(default=uuid.uuid4, editable=False, null=True), field=models.UUIDField(default=uuid.uuid4, editable=False, null=True),
), ),
migrations.RunPython(gen_uuid, reverse_code=migrations.RunPython.noop), migrations.RunPython(gen_uuid, reverse_code=migrations.RunPython.noop),
migrations.AlterField("datalayer", name="id", field=models.CharField(max_length=100, null=True)), migrations.RunSQL("ALTER TABLE umap_datalayer DROP CONSTRAINT umap_datalayer_pkey"),
# migrations.RemoveConstraint("datalayer", "id"),
migrations.AlterField("datalayer", name="id", field=models.IntegerField(null=True, blank=True)),
migrations.AlterField( migrations.AlterField(
model_name="datalayer", model_name="datalayer",
name="uuid", name="uuid",

View file

@ -375,6 +375,7 @@ class DataLayer(NamedModel):
(OWNER, _("Owner only")), (OWNER, _("Owner only")),
) )
uuid = models.UUIDField(unique=True, primary_key=True, default=uuid.uuid4, editable=False) uuid = models.UUIDField(unique=True, primary_key=True, default=uuid.uuid4, editable=False)
id = models.IntegerField(null=True, blank=True)
map = models.ForeignKey(Map, on_delete=models.CASCADE) map = models.ForeignKey(Map, on_delete=models.CASCADE)
description = models.TextField(blank=True, null=True, verbose_name=_("description")) description = models.TextField(blank=True, null=True, verbose_name=_("description"))
geojson = models.FileField(upload_to=upload_to, blank=True, null=True) geojson = models.FileField(upload_to=upload_to, blank=True, null=True)