From c3c234db38fdd8681481ecd01f296227771a7000 Mon Sep 17 00:00:00 2001 From: Evert-R Date: Tue, 12 Dec 2023 13:31:09 +0100 Subject: [PATCH] logical filenames for migrations --- ..._20231123_1340.py => 0004_migrate_json_data_to_JSONField.py} | 0 ...o_20231124_1146.py => 0005_rename_json_temp_to_json_data.py} | 2 +- backend/result/migrations/0006_remove_result_old_data.py | 2 +- ..._20231123_1339.py => 0003_migrate_json_data_to_JSONField.py} | 1 + ...o_20231124_1146.py => 0004_rename_json_temp_to_json_data.py} | 2 +- backend/session/migrations/0005_remove_session_old_data.py | 2 +- 6 files changed, 5 insertions(+), 4 deletions(-) rename backend/result/migrations/{0004_auto_20231123_1340.py => 0004_migrate_json_data_to_JSONField.py} (100%) rename backend/result/migrations/{0005_auto_20231124_1146.py => 0005_rename_json_temp_to_json_data.py} (88%) rename backend/session/migrations/{0003_auto_20231123_1339.py => 0003_migrate_json_data_to_JSONField.py} (93%) rename backend/session/migrations/{0004_auto_20231124_1146.py => 0004_rename_json_temp_to_json_data.py} (88%) diff --git a/backend/result/migrations/0004_auto_20231123_1340.py b/backend/result/migrations/0004_migrate_json_data_to_JSONField.py similarity index 100% rename from backend/result/migrations/0004_auto_20231123_1340.py rename to backend/result/migrations/0004_migrate_json_data_to_JSONField.py diff --git a/backend/result/migrations/0005_auto_20231124_1146.py b/backend/result/migrations/0005_rename_json_temp_to_json_data.py similarity index 88% rename from backend/result/migrations/0005_auto_20231124_1146.py rename to backend/result/migrations/0005_rename_json_temp_to_json_data.py index 5bfe0d863..1358161e6 100644 --- a/backend/result/migrations/0005_auto_20231124_1146.py +++ b/backend/result/migrations/0005_rename_json_temp_to_json_data.py @@ -6,7 +6,7 @@ class Migration(migrations.Migration): dependencies = [ - ('result', '0004_auto_20231123_1340'), + ('result', '0004_migrate_json_data_to_JSONField'), ] operations = [ diff --git a/backend/result/migrations/0006_remove_result_old_data.py b/backend/result/migrations/0006_remove_result_old_data.py index 975276f2e..624b6804d 100644 --- a/backend/result/migrations/0006_remove_result_old_data.py +++ b/backend/result/migrations/0006_remove_result_old_data.py @@ -6,7 +6,7 @@ class Migration(migrations.Migration): dependencies = [ - ('result', '0005_auto_20231124_1146'), + ('result', '0005_rename_json_temp_to_json_data'), ] operations = [ diff --git a/backend/session/migrations/0003_auto_20231123_1339.py b/backend/session/migrations/0003_migrate_json_data_to_JSONField.py similarity index 93% rename from backend/session/migrations/0003_auto_20231123_1339.py rename to backend/session/migrations/0003_migrate_json_data_to_JSONField.py index 0d916ffb1..4dc48dcc4 100644 --- a/backend/session/migrations/0003_auto_20231123_1339.py +++ b/backend/session/migrations/0003_migrate_json_data_to_JSONField.py @@ -12,6 +12,7 @@ def forwards_func(apps, schema_editor): session.save() def reverse_func(apps, schema_editor): + Session = apps.get_model('session', 'Session') for session in Session.objects.all(): session.json_data = json.dumps(session.json_temp) session.save() diff --git a/backend/session/migrations/0004_auto_20231124_1146.py b/backend/session/migrations/0004_rename_json_temp_to_json_data.py similarity index 88% rename from backend/session/migrations/0004_auto_20231124_1146.py rename to backend/session/migrations/0004_rename_json_temp_to_json_data.py index 5872cc210..8e4a697bc 100644 --- a/backend/session/migrations/0004_auto_20231124_1146.py +++ b/backend/session/migrations/0004_rename_json_temp_to_json_data.py @@ -5,7 +5,7 @@ class Migration(migrations.Migration): dependencies = [ - ('session', '0003_auto_20231123_1339'), + ('session', '0003_migrate_json_data_to_JSONField'), ] operations = [ diff --git a/backend/session/migrations/0005_remove_session_old_data.py b/backend/session/migrations/0005_remove_session_old_data.py index 5e6ca72d0..a5b0e5565 100644 --- a/backend/session/migrations/0005_remove_session_old_data.py +++ b/backend/session/migrations/0005_remove_session_old_data.py @@ -6,7 +6,7 @@ class Migration(migrations.Migration): dependencies = [ - ('session', '0004_auto_20231124_1146'), + ('session', '0004_rename_json_temp_to_json_data'), ] operations = [