# -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2020-01-10 15:19
from __future__ import unicode_literals

from django.db import migrations
from datetime import date


RATES = [
    {
        "exchangedate": "31.12.1997",
        "r030": 36,
        "cc": "AUD",
        "txt": "Австралійський долар",
        "enname": None,
        "rate": "124,18",
        "units": 100,
        "rate_per_unit": 1.2418,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 40,
        "cc": "ATS",
        "txt": "Австрійський шилінг",
        "enname": None,
        "rate": "15,06",
        "units": 100,
        "rate_per_unit": 0.1506,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 31,
        "cc": "AZM",
        "txt": "Азербайджанський манат",
        "enname": None,
        "rate": "4,88",
        "units": 10000,
        "rate_per_unit": 0.000488,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 56,
        "cc": "BEF",
        "txt": "Бельгійський франк",
        "enname": None,
        "rate": "51,37",
        "units": 1000,
        "rate_per_unit": 0.05137,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 112,
        "cc": "BYB",
        "txt": "<NAME>",
        "enname": None,
        "rate": "0,46",
        "units": 10000,
        "rate_per_unit": 0.000046,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 208,
        "cc": "DKK",
        "txt": "<NAME>",
        "enname": None,
        "rate": "27,81",
        "units": 100,
        "rate_per_unit": 0.2781,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 840,
        "cc": "USD",
        "txt": "<NAME>",
        "enname": None,
        "rate": "189,9",
        "units": 100,
        "rate_per_unit": 1.899,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 954,
        "cc": "XEU",
        "txt": "Екю",
        "enname": None,
        "rate": "209,59",
        "units": 100,
        "rate_per_unit": 2.0959,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 392,
        "cc": "JPY",
        "txt": "Єна",
        "enname": None,
        "rate": "14,66",
        "units": 1000,
        "rate_per_unit": 0.01466,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 233,
        "cc": "EEK",
        "txt": "Естонська крона",
        "enname": None,
        "rate": "13,25",
        "units": 100,
        "rate_per_unit": 0.1325,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 985,
        "cc": "PLN",
        "txt": "Злотий",
        "enname": None,
        "rate": "54,3",
        "units": 100,
        "rate_per_unit": 0.543,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 356,
        "cc": "INR",
        "txt": "<NAME>ія",
        "enname": None,
        "rate": "48,51",
        "units": 1000,
        "rate_per_unit": 0.04851,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 352,
        "cc": "ISK",
        "txt": "Ісландська крона",
        "enname": None,
        "rate": "2,65",
        "units": 100,
        "rate_per_unit": 0.0265,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 724,
        "cc": "ESP",
        "txt": "<NAME>",
        "enname": None,
        "rate": "12,52",
        "units": 1000,
        "rate_per_unit": 0.01252,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 380,
        "cc": "ITL",
        "txt": "<NAME>",
        "enname": None,
        "rate": "10,78",
        "units": 10000,
        "rate_per_unit": 0.001078,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 124,
        "cc": "CAD",
        "txt": "<NAME>",
        "enname": None,
        "rate": "131,87",
        "units": 100,
        "rate_per_unit": 1.3187,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 952,
        "cc": "XOF",
        "txt": "КФ<NAME> BCEAO",
        "enname": None,
        "rate": "3,2",
        "units": 1000,
        "rate_per_unit": 0.0032,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 428,
        "cc": "LVL",
        "txt": "Латвійський лат",
        "enname": None,
        "rate": "321,86",
        "units": 100,
        "rate_per_unit": 3.2186,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 440,
        "cc": "LTL",
        "txt": "Литовський літ",
        "enname": None,
        "rate": "47,48",
        "units": 100,
        "rate_per_unit": 0.4748,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 246,
        "cc": "FIM",
        "txt": "Марка (Фінляндія)",
        "enname": None,
        "rate": "35,02",
        "units": 100,
        "rate_per_unit": 0.3502,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 498,
        "cc": "MDL",
        "txt": "<NAME>",
        "enname": None,
        "rate": "40,75",
        "units": 100,
        "rate_per_unit": 0.4075,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 280,
        "cc": "DEM",
        "txt": "Німецька марка",
        "enname": None,
        "rate": "105,97",
        "units": 100,
        "rate_per_unit": 1.0597,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 376,
        "cc": "ILS",
        "txt": "Новий ізраїльський шекель",
        "enname": None,
        "rate": "53,68",
        "units": 100,
        "rate_per_unit": 0.5368,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 901,
        "cc": "TWD",
        "txt": "Новий тайванський долар",
        "enname": None,
        "rate": "5,81",
        "units": 100,
        "rate_per_unit": 0.0581,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 578,
        "cc": "NOK",
        "txt": "<NAME>",
        "enname": None,
        "rate": "25,81",
        "units": 100,
        "rate_per_unit": 0.2581,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 528,
        "cc": "NLG",
        "txt": "Нiдерландський гульден",
        "enname": None,
        "rate": "94,03",
        "units": 100,
        "rate_per_unit": 0.9403,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 702,
        "cc": "SGD",
        "txt": "Сінгапурський долар",
        "enname": None,
        "rate": "113,61",
        "units": 100,
        "rate_per_unit": 1.1361,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 703,
        "cc": "SKK",
        "txt": "Словацька крона",
        "enname": None,
        "rate": "5,5",
        "units": 100,
        "rate_per_unit": 0.055,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 960,
        "cc": "XDR",
        "txt": "Спецiальнi права запозичення",
        "enname": None,
        "rate": "255,1",
        "units": 100,
        "rate_per_unit": 2.551,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 398,
        "cc": "KZT",
        "txt": "Теньге",
        "enname": None,
        "rate": "2,5",
        "units": 100,
        "rate_per_unit": 0.025,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 792,
        "cc": "TRL",
        "txt": "Турецька ліра",
        "enname": None,
        "rate": "0,09",
        "units": 10000,
        "rate_per_unit": 0.000009,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 795,
        "cc": "TMM",
        "txt": "Туркменський манат",
        "enname": None,
        "rate": "4,56",
        "units": 10000,
        "rate_per_unit": 0.000456,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 860,
        "cc": "UZS",
        "txt": "Узбецький сум",
        "enname": None,
        "rate": "2,37",
        "units": 100,
        "rate_per_unit": 0.0237,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 348,
        "cc": "HUF",
        "txt": "Форинт",
        "enname": None,
        "rate": "9,39",
        "units": 1000,
        "rate_per_unit": 0.00939,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 250,
        "cc": "FRF",
        "txt": "Французький франк",
        "enname": None,
        "rate": "31,67",
        "units": 100,
        "rate_per_unit": 0.3167,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 826,
        "cc": "GBP",
        "txt": "<NAME>",
        "enname": None,
        "rate": "315,99",
        "units": 100,
        "rate_per_unit": 3.1599,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 191,
        "cc": "HRK",
        "txt": "<NAME>",
        "enname": None,
        "rate": "30,46",
        "units": 100,
        "rate_per_unit": 0.3046,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 203,
        "cc": "CZK",
        "txt": "<NAME>",
        "enname": None,
        "rate": "5,55",
        "units": 100,
        "rate_per_unit": 0.0555,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 752,
        "cc": "SEK",
        "txt": "<NAME>",
        "enname": None,
        "rate": "24,03",
        "units": 100,
        "rate_per_unit": 0.2403,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 756,
        "cc": "CHF",
        "txt": "Швейцарський франк",
        "enname": None,
        "rate": "130,6",
        "units": 100,
        "rate_per_unit": 1.306,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 156,
        "cc": "CNY",
        "txt": "<NAME>",
        "enname": None,
        "rate": "22,94",
        "units": 100,
        "rate_per_unit": 0.2294,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 643,
        "cc": "RUB",
        "txt": "Російський рубль",
        "enname": "Russian Ruble",
        "rate": "3115,80",
        "units": 1,
        "rate_per_unit": 1 / 3115.80,
        "group": "1",
        "calcdate": " ",
    }
]


def add_1997(apps, schema_editor):
    ExchangeRate = apps.get_model("core", "ExchangeRate")

    rates = dict((rec["cc"], str(1 / rec["rate_per_unit"])) for rec in RATES)

    ExchangeRate.objects.create(dt=date(1997, 12, 31), is_annual=True, rates=rates)


class Migration(migrations.Migration):

    dependencies = [("core", "0176_auto_20200110_1635")]

    operations = [
        migrations.RunPython(add_1997, reverse_code=migrations.RunPython.noop)
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2020-01-10 15:19
from __future__ import unicode_literals

from django.db import migrations
from datetime import date


RATES = [
    {
        "exchangedate": "31.12.1997",
        "r030": 36,
        "cc": "AUD",
        "txt": "Австралійський долар",
        "enname": None,
        "rate": "124,18",
        "units": 100,
        "rate_per_unit": 1.2418,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 40,
        "cc": "ATS",
        "txt": "Австрійський шилінг",
        "enname": None,
        "rate": "15,06",
        "units": 100,
        "rate_per_unit": 0.1506,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 31,
        "cc": "AZM",
        "txt": "Азербайджанський манат",
        "enname": None,
        "rate": "4,88",
        "units": 10000,
        "rate_per_unit": 0.000488,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 56,
        "cc": "BEF",
        "txt": "Бельгійський франк",
        "enname": None,
        "rate": "51,37",
        "units": 1000,
        "rate_per_unit": 0.05137,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 112,
        "cc": "BYB",
        "txt": "<NAME>",
        "enname": None,
        "rate": "0,46",
        "units": 10000,
        "rate_per_unit": 0.000046,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 208,
        "cc": "DKK",
        "txt": "<NAME>",
        "enname": None,
        "rate": "27,81",
        "units": 100,
        "rate_per_unit": 0.2781,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 840,
        "cc": "USD",
        "txt": "<NAME>",
        "enname": None,
        "rate": "189,9",
        "units": 100,
        "rate_per_unit": 1.899,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 954,
        "cc": "XEU",
        "txt": "Екю",
        "enname": None,
        "rate": "209,59",
        "units": 100,
        "rate_per_unit": 2.0959,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 392,
        "cc": "JPY",
        "txt": "Єна",
        "enname": None,
        "rate": "14,66",
        "units": 1000,
        "rate_per_unit": 0.01466,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 233,
        "cc": "EEK",
        "txt": "Естонська крона",
        "enname": None,
        "rate": "13,25",
        "units": 100,
        "rate_per_unit": 0.1325,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 985,
        "cc": "PLN",
        "txt": "Злотий",
        "enname": None,
        "rate": "54,3",
        "units": 100,
        "rate_per_unit": 0.543,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 356,
        "cc": "INR",
        "txt": "<NAME>ія",
        "enname": None,
        "rate": "48,51",
        "units": 1000,
        "rate_per_unit": 0.04851,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 352,
        "cc": "ISK",
        "txt": "Ісландська крона",
        "enname": None,
        "rate": "2,65",
        "units": 100,
        "rate_per_unit": 0.0265,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 724,
        "cc": "ESP",
        "txt": "<NAME>",
        "enname": None,
        "rate": "12,52",
        "units": 1000,
        "rate_per_unit": 0.01252,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 380,
        "cc": "ITL",
        "txt": "<NAME>",
        "enname": None,
        "rate": "10,78",
        "units": 10000,
        "rate_per_unit": 0.001078,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 124,
        "cc": "CAD",
        "txt": "<NAME>",
        "enname": None,
        "rate": "131,87",
        "units": 100,
        "rate_per_unit": 1.3187,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 952,
        "cc": "XOF",
        "txt": "КФ<NAME> BCEAO",
        "enname": None,
        "rate": "3,2",
        "units": 1000,
        "rate_per_unit": 0.0032,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 428,
        "cc": "LVL",
        "txt": "Латвійський лат",
        "enname": None,
        "rate": "321,86",
        "units": 100,
        "rate_per_unit": 3.2186,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 440,
        "cc": "LTL",
        "txt": "Литовський літ",
        "enname": None,
        "rate": "47,48",
        "units": 100,
        "rate_per_unit": 0.4748,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 246,
        "cc": "FIM",
        "txt": "Марка (Фінляндія)",
        "enname": None,
        "rate": "35,02",
        "units": 100,
        "rate_per_unit": 0.3502,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 498,
        "cc": "MDL",
        "txt": "<NAME>",
        "enname": None,
        "rate": "40,75",
        "units": 100,
        "rate_per_unit": 0.4075,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 280,
        "cc": "DEM",
        "txt": "Німецька марка",
        "enname": None,
        "rate": "105,97",
        "units": 100,
        "rate_per_unit": 1.0597,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 376,
        "cc": "ILS",
        "txt": "Новий ізраїльський шекель",
        "enname": None,
        "rate": "53,68",
        "units": 100,
        "rate_per_unit": 0.5368,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 901,
        "cc": "TWD",
        "txt": "Новий тайванський долар",
        "enname": None,
        "rate": "5,81",
        "units": 100,
        "rate_per_unit": 0.0581,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 578,
        "cc": "NOK",
        "txt": "<NAME>",
        "enname": None,
        "rate": "25,81",
        "units": 100,
        "rate_per_unit": 0.2581,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 528,
        "cc": "NLG",
        "txt": "Нiдерландський гульден",
        "enname": None,
        "rate": "94,03",
        "units": 100,
        "rate_per_unit": 0.9403,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 702,
        "cc": "SGD",
        "txt": "Сінгапурський долар",
        "enname": None,
        "rate": "113,61",
        "units": 100,
        "rate_per_unit": 1.1361,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 703,
        "cc": "SKK",
        "txt": "Словацька крона",
        "enname": None,
        "rate": "5,5",
        "units": 100,
        "rate_per_unit": 0.055,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 960,
        "cc": "XDR",
        "txt": "Спецiальнi права запозичення",
        "enname": None,
        "rate": "255,1",
        "units": 100,
        "rate_per_unit": 2.551,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 398,
        "cc": "KZT",
        "txt": "Теньге",
        "enname": None,
        "rate": "2,5",
        "units": 100,
        "rate_per_unit": 0.025,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 792,
        "cc": "TRL",
        "txt": "Турецька ліра",
        "enname": None,
        "rate": "0,09",
        "units": 10000,
        "rate_per_unit": 0.000009,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 795,
        "cc": "TMM",
        "txt": "Туркменський манат",
        "enname": None,
        "rate": "4,56",
        "units": 10000,
        "rate_per_unit": 0.000456,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 860,
        "cc": "UZS",
        "txt": "Узбецький сум",
        "enname": None,
        "rate": "2,37",
        "units": 100,
        "rate_per_unit": 0.0237,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 348,
        "cc": "HUF",
        "txt": "Форинт",
        "enname": None,
        "rate": "9,39",
        "units": 1000,
        "rate_per_unit": 0.00939,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 250,
        "cc": "FRF",
        "txt": "Французький франк",
        "enname": None,
        "rate": "31,67",
        "units": 100,
        "rate_per_unit": 0.3167,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 826,
        "cc": "GBP",
        "txt": "<NAME>",
        "enname": None,
        "rate": "315,99",
        "units": 100,
        "rate_per_unit": 3.1599,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 191,
        "cc": "HRK",
        "txt": "<NAME>",
        "enname": None,
        "rate": "30,46",
        "units": 100,
        "rate_per_unit": 0.3046,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 203,
        "cc": "CZK",
        "txt": "<NAME>",
        "enname": None,
        "rate": "5,55",
        "units": 100,
        "rate_per_unit": 0.0555,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 752,
        "cc": "SEK",
        "txt": "<NAME>",
        "enname": None,
        "rate": "24,03",
        "units": 100,
        "rate_per_unit": 0.2403,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 756,
        "cc": "CHF",
        "txt": "Швейцарський франк",
        "enname": None,
        "rate": "130,6",
        "units": 100,
        "rate_per_unit": 1.306,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 156,
        "cc": "CNY",
        "txt": "<NAME>",
        "enname": None,
        "rate": "22,94",
        "units": 100,
        "rate_per_unit": 0.2294,
        "group": "1",
        "calcdate": " ",
    },
    {
        "exchangedate": "31.12.1997",
        "r030": 643,
        "cc": "RUB",
        "txt": "Російський рубль",
        "enname": "Russian Ruble",
        "rate": "3115,80",
        "units": 1,
        "rate_per_unit": 1 / 3115.80,
        "group": "1",
        "calcdate": " ",
    }
]


def add_1997(apps, schema_editor):
    ExchangeRate = apps.get_model("core", "ExchangeRate")

    rates = dict((rec["cc"], str(1 / rec["rate_per_unit"])) for rec in RATES)

    ExchangeRate.objects.create(dt=date(1997, 12, 31), is_annual=True, rates=rates)


class Migration(migrations.Migration):

    dependencies = [("core", "0176_auto_20200110_1635")]

    operations = [
        migrations.RunPython(add_1997, reverse_code=migrations.RunPython.noop)
    ]

# -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2020-01-10 15:19