misc: migrate map/layers many to many table (#...)

This commit is contained in:
Frédéric Péters 2018-01-08 18:43:33 +01:00
parent 1c2fe18a69
commit 85cf3e767f
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('maps', '0007_auto_20180107_1355'),
]
operations = [
migrations.RunSQL("""
UPDATE maps_map_layers SET map_id =
(SELECT data_cellbase.id
FROM data_cellbase
WHERE data_cellbase.subclassid = maps_map_layers.map_id
AND data_cellbase.subclass = 27);"""),
]