Merge branch 'feature/migrate-city-objects' of ssh://gl.id-east.ru:222/gm/gm-backend into feature/migrate-city-objects
Conflicts: apps/location/transfer.py
This commit is contained in:
commit
e2a991df98
|
|
@ -1,29 +1,25 @@
|
||||||
Country = {
|
"""
|
||||||
"dependencies": None,
|
Структура fields:
|
||||||
"legacy": "Cities",
|
key - поле в таблице postgres
|
||||||
"fields": {
|
value - поле или группа полей в таблице legacy
|
||||||
"code": "country_code_2"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Region = {
|
В случае передачи группы полей каждое поле представляет собой кортеж, где:
|
||||||
"dependencies": ["Country", "self"],
|
field[0] - название аргумента
|
||||||
"legacy": "Cities",
|
field[1] - название поля в таблице legacy
|
||||||
"fields": {
|
Опционально: field[2] - тип данных для преобразования
|
||||||
"code": "region_code",
|
|
||||||
"country": "Country",
|
"""
|
||||||
"parent_region": "self",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
City = {
|
City = {
|
||||||
"dependencies": ["Country", "Region"],
|
"dependencies": ("Country", "Region"),
|
||||||
"legacy": "Cities",
|
|
||||||
"fields": {
|
"fields": {
|
||||||
|
"Cities": {
|
||||||
|
"coordinates": (("lat", "latitude", "Boolean"), ("long", "longtitude")),
|
||||||
|
"code": "country_code_2"
|
||||||
|
},
|
||||||
|
"CityNames": {
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"region": "Region",
|
|
||||||
"country": "Country",
|
}
|
||||||
"postal_code": "zip_code",
|
|
||||||
"is_island": "is_island",
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user