-- Insert districts for Rīga (city_id = 1)
INSERT IGNORE INTO districts (city_id, slug, name_lv, name_ru, name_en, lat, lng, is_active, sort_order)
SELECT c.id, d.slug, d.name_lv, d.name_ru, d.name_en, d.lat, d.lng, 1, d.sort_order
FROM cities c
CROSS JOIN (
    SELECT 'latgales'   AS slug, 'Latgales priekšpilsēta'  AS name_lv, 'Латгальское предместье' AS name_ru, 'Latgale Suburb'    AS name_en, 56.9280000 AS lat, 24.1620000 AS lng, 1 AS sort_order UNION ALL
    SELECT 'vidzemes',           'Vidzemes priekšpilsēta',              'Видземское предместье',             'Vidzeme Suburb',        56.9710000,     24.1260000,     2 UNION ALL
    SELECT 'zemgales',           'Zemgales priekšpilsēta',              'Земгальское предместье',            'Zemgale Suburb',        56.9180000,     24.0710000,     3 UNION ALL
    SELECT 'centrs',             'Centra rajons',                        'Центральный район',                 'Central District',      56.9500000,     24.1050000,     4 UNION ALL
    SELECT 'pardaugava',         'Pārdaugava',                          'Задвинье',                          'Pardaugava',            56.9200000,     24.0700000,     5 UNION ALL
    SELECT 'agenskalns',         'Āgenskalns',                          'Агенскалнс',                        'Agenskalns',            56.9330000,     24.0780000,     6 UNION ALL
    SELECT 'imanta',             'Imanta',                              'Иманта',                            'Imanta',                56.9380000,     24.0180000,     7 UNION ALL
    SELECT 'purvciems',          'Purvciems',                           'Пурвциемс',                         'Purvciems',             56.9660000,     24.1800000,     8 UNION ALL
    SELECT 'mezciems',           'Mežciems',                            'Межциемс',                          'Mezciems',              56.9720000,     24.1970000,     9 UNION ALL
    SELECT 'teika',              'Teika',                               'Тейка',                             'Teika',                 56.9700000,     24.1500000,     10 UNION ALL
    SELECT 'ziepniekkalns',      'Ziepniekkalns',                       'Зиепниеккалнс',                     'Ziepniekkalns',         56.9040000,     24.0830000,     11 UNION ALL
    SELECT 'bolderaja',          'Bolderāja',                           'Болдерая',                          'Bolderaja',             57.0180000,     24.0130000,     12
) d
WHERE c.slug = 'riga';
