Skip to content

Commit

Permalink
Merge pull request #5765 from uktrade/feature/add-legacy-export-exper…
Browse files Browse the repository at this point in the history
…ience

Add legacy export experience values.
  • Loading branch information
elcct authored Nov 7, 2024
2 parents 2e9998f + 8b9b962 commit 1f4ca52
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 3.2.16 on 2023-03-08 13:04
from pathlib import PurePath

from django.db import migrations

from datahub.core.migration_utils import load_yaml_data_in_migration


def load_export_metadata(apps, _):
load_yaml_data_in_migration(
apps,
PurePath(__file__).parent / '0144_update_company_export_experience.yaml',
)


class Migration(migrations.Migration):

dependencies = [
('company', '0143_contact_consent_data_and_more'),
]

operations = [
migrations.RunPython(load_export_metadata, migrations.RunPython.noop),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- model: company.exportexperience
pk: d23012c5-c1a6-459d-9e05-b3d1b8539025
fields:
disabled_on: 2018-06-20T10:19:43Z
name: Is an exporter but exports currently account for less than 10% of its overall turnover
order: 1040
- model: company.exportexperience
pk: 9390cc45-6ebb-4005-866c-c87fd6d6dec0
fields:
disabled_on: 2018-06-20T10:19:43Z
name: Is an exporter but has only won export orders in three countries or fewer
order: 1080
24 changes: 24 additions & 0 deletions datahub/export_win/migrations/0056_update_export_experience.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 4.2.10 on 2024-03-20 13:40

from django.db import migrations, models
from pathlib import PurePath


from datahub.core.migration_utils import load_yaml_data_in_migration

def load_export_experience(apps, _):
load_yaml_data_in_migration(
apps,
PurePath(__file__).parent / '0056_update_export_experience.yaml'
)

class Migration(migrations.Migration):

dependencies = [
('export_win', '0055_customerresponsetoken_adviser'),
('company', '0144_update_company_export_experience'),
]

operations = [
migrations.RunPython(load_export_experience, migrations.RunPython.noop),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- model: export_win.experiencecategories
pk: b6a47b4c-4cfc-495c-aaec-d6480c4cac3b
fields:
export_experience: d23012c5-c1a6-459d-9e05-b3d1b8539025

- model: export_win.experiencecategories
pk: fd3fbbd0-6c04-4110-aa6a-ba84a91c3272
fields:
export_experience: 9390cc45-6ebb-4005-866c-c87fd6d6dec0

0 comments on commit 1f4ca52

Please sign in to comment.