diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-02-27 11:44:02 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-02-27 16:50:35 +0100 |
commit | 4a51d61fed379b8112ca815d6f1f36c9da40b95a (patch) | |
tree | 17616e0618b25b58db44800d5e25e13abb86399f | |
parent | edbd77024003dae9cfbb91220c5d46ef1b140cf5 (diff) | |
download | Ishtar-4a51d61fed379b8112ca815d6f1f36c9da40b95a.tar.bz2 Ishtar-4a51d61fed379b8112ca815d6f1f36c9da40b95a.zip |
🩹 fix migrations
-rw-r--r-- | ishtar_common/migrations/0237_data_migration.json | 120 | ||||
-rw-r--r-- | ishtar_common/migrations/0239_shootingangle_parent.json | 122 | ||||
-rw-r--r-- | ishtar_common/migrations/0239_shootingangle_parent.py | 8 |
3 files changed, 130 insertions, 120 deletions
diff --git a/ishtar_common/migrations/0237_data_migration.json b/ishtar_common/migrations/0237_data_migration.json index 90511ee81..d07bd7385 100644 --- a/ishtar_common/migrations/0237_data_migration.json +++ b/ishtar_common/migrations/0237_data_migration.json @@ -34,125 +34,5 @@ "parent": null, "url": null } -}, -{ - "model": "ishtar_common.shootingangle", - "fields": { - "label": "Z\u00e9nithal", - "txt_idx": "zenithal", - "comment": "", - "available": true, - "order": 10 - } -}, -{ - "model": "ishtar_common.shootingangle", - "fields": { - "label": "Oblique", - "txt_idx": "oblique", - "comment": "", - "available": true, - "order": 20 - } -}, -{ - "model": "ishtar_common.shootingangle", - "fields": { - "label": "Depuis le nord", - "txt_idx": "depuis-le-nord", - "comment": "", - "available": true, - "order": 30 - } -}, -{ - "model": "ishtar_common.shootingangle", - "fields": { - "label": "Depuis l\u2019ouest", - "txt_idx": "depuis-louest", - "comment": "", - "available": true, - "order": 40 - } -}, -{ - "model": "ishtar_common.shootingangle", - "fields": { - "label": "Depuis l\u2019est", - "txt_idx": "depuis-lest", - "comment": "", - "available": true, - "order": 50 - } -}, -{ - "model": "ishtar_common.shootingangle", - "fields": { - "label": "Depuis le sud", - "txt_idx": "depuis-le-sud", - "comment": "", - "available": true, - "order": 60 - } -}, -{ - "model": "ishtar_common.shootingangle", - "fields": { - "label": "Depuis le nord-ouest", - "txt_idx": "depuis-le-nord-ouest", - "comment": "", - "available": true, - "order": 70 - } -}, -{ - "model": "ishtar_common.shootingangle", - "fields": { - "label": "Depuis le nord-est", - "txt_idx": "depuis-le-nord-est", - "comment": "", - "available": true, - "order": 80 - } -}, -{ - "model": "ishtar_common.shootingangle", - "fields": { - "label": "Depuis le sud-ouest", - "txt_idx": "depuis-le-sud-ouest", - "comment": "", - "available": true, - "order": 90 - } -}, -{ - "model": "ishtar_common.shootingangle", - "fields": { - "label": "Depuis le sud-est", - "txt_idx": "depuis-le-sud-est", - "comment": "", - "available": true, - "order": 100 - } -}, -{ - "model": "ishtar_common.shootingangle", - "fields": { - "label": "Recto / face", - "txt_idx": "recto-face", - "comment": "", - "available": true, - "order": 110 - } -}, -{ - "model": "ishtar_common.shootingangle", - "fields": { - "label": "Verso / revers", - "txt_idx": "verso-revers", - "comment": "", - "available": true, - "order": 120 - } } ] diff --git a/ishtar_common/migrations/0239_shootingangle_parent.json b/ishtar_common/migrations/0239_shootingangle_parent.json new file mode 100644 index 000000000..9a1cb8379 --- /dev/null +++ b/ishtar_common/migrations/0239_shootingangle_parent.json @@ -0,0 +1,122 @@ +[ +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Z\u00e9nithal", + "txt_idx": "zenithal", + "comment": "", + "available": true, + "order": 10 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Oblique", + "txt_idx": "oblique", + "comment": "", + "available": true, + "order": 20 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Depuis le nord", + "txt_idx": "depuis-le-nord", + "comment": "", + "available": true, + "order": 30 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Depuis l\u2019ouest", + "txt_idx": "depuis-louest", + "comment": "", + "available": true, + "order": 40 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Depuis l\u2019est", + "txt_idx": "depuis-lest", + "comment": "", + "available": true, + "order": 50 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Depuis le sud", + "txt_idx": "depuis-le-sud", + "comment": "", + "available": true, + "order": 60 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Depuis le nord-ouest", + "txt_idx": "depuis-le-nord-ouest", + "comment": "", + "available": true, + "order": 70 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Depuis le nord-est", + "txt_idx": "depuis-le-nord-est", + "comment": "", + "available": true, + "order": 80 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Depuis le sud-ouest", + "txt_idx": "depuis-le-sud-ouest", + "comment": "", + "available": true, + "order": 90 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Depuis le sud-est", + "txt_idx": "depuis-le-sud-est", + "comment": "", + "available": true, + "order": 100 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Recto / face", + "txt_idx": "recto-face", + "comment": "", + "available": true, + "order": 110 + } +}, +{ + "model": "ishtar_common.shootingangle", + "fields": { + "label": "Verso / revers", + "txt_idx": "verso-revers", + "comment": "", + "available": true, + "order": 120 + } +} +] diff --git a/ishtar_common/migrations/0239_shootingangle_parent.py b/ishtar_common/migrations/0239_shootingangle_parent.py index fc023ccbc..4c530b46c 100644 --- a/ishtar_common/migrations/0239_shootingangle_parent.py +++ b/ishtar_common/migrations/0239_shootingangle_parent.py @@ -1,7 +1,14 @@ # Generated by Django 2.2.24 on 2024-02-27 11:20 +import os from django.db import migrations, models import django.db.models.deletion +from django.core.management import call_command + + +def load_data(_, __): + json_path = os.sep.join(os.path.abspath(__file__).split(os.sep)[:-1] + ["0237_data_migration.json"]) + call_command("loaddata", json_path) class Migration(migrations.Migration): @@ -16,4 +23,5 @@ class Migration(migrations.Migration): name='parent', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='ishtar_common.ShootingAngle', verbose_name='Parent'), ), + migrations.RunPython(load_data) ] |