blueprints: run initial migration before flows are created (#24880)

The initial migration disables every non-system blueprint when a flow already
exists, which assumes it runs before anything that creates one. Since the agents
app landed that assumption no longer holds, so fresh installs come up with all
default flows disabled.

Closes: #24879

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Dominic Roy
2026-08-07 12:31:59 -04:00
committed by GitHub
parent b96f8b1ba1
commit e8c7a9d06e

View File

@@ -73,6 +73,11 @@ class Migration(migrations.Migration):
dependencies = [("authentik_flows", "0001_initial")]
# migration_blueprint_import below treats "a flow already exists" as "this is an existing
# install". That only holds if we run before any migration that creates a flow, which is
# otherwise up to how Django happens to order the plan.
run_before = [("authentik_core", "0040_provider_invalidation_flow")]
operations = [
migrations.CreateModel(
name="BlueprintInstance",