umap/umap/migrations
Alexis Métaireau 7dadb83ff5 feat(sync): Let the clients set layers UUID
This make it possible to synchronize datalayers before their creation on
the server, allowing at the same time to solve issues related to them
not being saved (e.g. duplication of geometries)

We use the DataLayer._referenceVersion to track if a DataLayer has been
saved on the server.

After a save, the _referenceVersion is synched with other peers.

To pass the reference version from the server to the frontend, we have two
options:
- use a header
- populate the `options.version` field

In the case of a GET on a Datalayer, we could not use the `options` scenario
because:
- the value in the file is not up to date (it was the value the client has
 before the save)
- the python cannot change it on the fly, as the file is served by nginx

So we decided to keep using a header. But on the map view, we load all
datalayers metadatas in the map options, so here we cannot use the header
scenario, so in this specific case we had to populate `options._referenceVersion`.

At the same time, we also changed:
- Umap.options.umap_id => Umap.id
- DataLayer.umap_id => Datalayer.id
- fixed the version number returned by DataLayer.version_metadata
2024-11-15 15:22:36 +01:00
..
0001_initial.py [style] Format the code 2023-11-24 23:31:18 +01:00
0002_tilelayer_tms.py [style] Format the code 2023-11-24 23:31:18 +01:00
0003_add_tilelayer.py [style] Format the code 2023-11-24 23:31:18 +01:00
0004_add_licence.py [style] Format the code 2023-11-24 23:31:18 +01:00
0005_remove_map_tilelayer.py [style] Format the code 2023-11-24 23:31:18 +01:00
0006_auto_20190407_0719.py [style] Format the code 2023-11-24 23:31:18 +01:00
0007_auto_20190416_1757.py [style] Format the code 2023-11-24 23:31:18 +01:00
0008_alter_map_settings.py [style] Format the code 2023-11-24 23:31:18 +01:00
0009_star.py [style] Format the code 2023-11-24 23:31:18 +01:00
0010_alter_map_edit_status_alter_map_share_status.py [style] Format the code 2023-11-24 23:31:18 +01:00
0011_alter_map_edit_status_alter_map_share_status.py [style] Format the code 2023-11-24 23:31:18 +01:00
0012_datalayer_settings.py Store DataLayer's settings in DB 2023-08-20 09:48:01 +02:00
0013_datalayer_edit_status.py Reset DataLayer.edit_status migration 2023-09-22 17:32:19 +02:00
0014_map_created_at.py [style] Format the code 2023-11-24 23:31:18 +01:00
0015_alter_pictogram_pictogram.py Use FileField instead of ImageField for pictogram to allow SVG 2023-10-30 12:45:05 +01:00
0016_pictogram_category.py Add Pictogram.category and list pictos grouped by category 2023-10-30 21:07:55 +01:00
0017_migrate_to_openstreetmap_oauth2.py chore: migrate to OAuth 2 for OpenStreetMap backend 2024-02-14 11:30:16 +01:00
0018_datalayer_uuid.py chore: Rename datalayer id to old_id 2024-03-05 11:23:12 +01:00
0019_migrate_internal_remote_datalayers.py chore: Rename datalayer id to old_id 2024-03-05 11:23:12 +01:00
0020_alter_tilelayer_url_template.py fix: increase TileLayer.url_template size 2024-04-17 11:19:31 +02:00
0021_remove_map_description.py feat: remove Map.description 2024-04-24 16:39:59 +02:00
0022_add_team.py chore: remove logo_url from Team model 2024-08-30 10:55:26 -04:00
0023_alter_datalayer_uuid.py feat(sync): Let the clients set layers UUID 2024-11-15 15:22:36 +01:00
__init__.py Add a migration to create a TileLayer if none exists 2016-11-26 17:25:59 +01:00