Add SQL migration to populate DataLayer.edit_status from Map.edit_status
This commit is contained in:
parent
af44b3a0a6
commit
2d1d9281d9
1 changed files with 16 additions and 0 deletions
16
umap/migrations/0014_migrate_edit_status.py
Normal file
16
umap/migrations/0014_migrate_edit_status.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Generated by Django 4.2.2 on 2023-09-12 09:24
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("umap", "0013_datalayer_edit_status"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunSQL(
|
||||
"UPDATE umap_datalayer SET edit_status=("
|
||||
"SELECT edit_status FROM umap_map WHERE umap_map.id=umap_datalayer.map_id);"
|
||||
)
|
||||
]
|
Loading…
Reference in a new issue