From 71c58cee9e454690689192b370d380798634453e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Fern=C3=A1ndez=20Poyatos?= Date: Mon, 23 Dec 2024 12:26:00 +0100 Subject: [PATCH] fix(migrations): fix django migration order dependency (#6302) --- ..._update_provider_unique_constraint_with_is_deleted.py} | 2 +- .../backend/api/migrations/{0003_rbac.py => 0004_rbac.py} | 8 +++++--- ...ng_admin_roles.py => 0005_rbac_missing_admin_roles.py} | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) rename api/src/backend/api/migrations/{0005_update_provider_unique_constraint_with_is_deleted.py => 0003_update_provider_unique_constraint_with_is_deleted.py} (91%) rename api/src/backend/api/migrations/{0003_rbac.py => 0004_rbac.py} (99%) rename api/src/backend/api/migrations/{0004_rbac_missing_admin_roles.py => 0005_rbac_missing_admin_roles.py} (97%) diff --git a/api/src/backend/api/migrations/0005_update_provider_unique_constraint_with_is_deleted.py b/api/src/backend/api/migrations/0003_update_provider_unique_constraint_with_is_deleted.py similarity index 91% rename from api/src/backend/api/migrations/0005_update_provider_unique_constraint_with_is_deleted.py rename to api/src/backend/api/migrations/0003_update_provider_unique_constraint_with_is_deleted.py index 5fd5097376f..0dd152be342 100644 --- a/api/src/backend/api/migrations/0005_update_provider_unique_constraint_with_is_deleted.py +++ b/api/src/backend/api/migrations/0003_update_provider_unique_constraint_with_is_deleted.py @@ -5,7 +5,7 @@ class Migration(migrations.Migration): dependencies = [ - ("api", "0004_rbac_missing_admin_roles"), + ("api", "0002_token_migrations"), ] operations = [ diff --git a/api/src/backend/api/migrations/0003_rbac.py b/api/src/backend/api/migrations/0004_rbac.py similarity index 99% rename from api/src/backend/api/migrations/0003_rbac.py rename to api/src/backend/api/migrations/0004_rbac.py index dd0936c5be3..4453b1b5886 100644 --- a/api/src/backend/api/migrations/0003_rbac.py +++ b/api/src/backend/api/migrations/0004_rbac.py @@ -1,15 +1,17 @@ # Generated by Django 5.1.1 on 2024-12-05 12:29 -import api.rls -import django.db.models.deletion import uuid + +import django.db.models.deletion from django.conf import settings from django.db import migrations, models +import api.rls + class Migration(migrations.Migration): dependencies = [ - ("api", "0002_token_migrations"), + ("api", "0003_update_provider_unique_constraint_with_is_deleted"), ] operations = [ diff --git a/api/src/backend/api/migrations/0004_rbac_missing_admin_roles.py b/api/src/backend/api/migrations/0005_rbac_missing_admin_roles.py similarity index 97% rename from api/src/backend/api/migrations/0004_rbac_missing_admin_roles.py rename to api/src/backend/api/migrations/0005_rbac_missing_admin_roles.py index 287ad6e7e1e..0392145063e 100644 --- a/api/src/backend/api/migrations/0004_rbac_missing_admin_roles.py +++ b/api/src/backend/api/migrations/0005_rbac_missing_admin_roles.py @@ -1,4 +1,5 @@ from django.db import migrations + from api.db_router import MainRouter @@ -35,7 +36,7 @@ def create_admin_role(apps, schema_editor): class Migration(migrations.Migration): dependencies = [ - ("api", "0003_rbac"), + ("api", "0004_rbac"), ] operations = [