Skip to content

src/dazzle_back/alembic/env.py

Generated: 2026-03-30T04:38:45.564582+00:00

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

Alembic environment configuration for Dazzle.

Reads DATABASE_URL from the environment and uses the EntitySpec → SQLAlchemy MetaData bridge as target_metadata so that --autogenerate can diff the DSL schema against the live database.

Key Exports

  • run_migrations_offline
  • run_migrations_online

Dependencies

Imports

  • logging
  • os
  • sys
  • logging.config.fileConfig
  • pathlib.Path
  • typing.Any
  • sqlalchemy
  • alembic.context
  • alembic.operations.ops
  • sqlalchemy
  • sqlalchemy.create_engine
  • dazzle.core.dsl_parser.parse_modules
  • dazzle.core.fileset.discover_dsl_files
  • dazzle.core.linker.build_appspec
  • dazzle.core.manifest.load_manifest
  • dazzle_back.runtime.sa_schema.build_metadata
  • dazzle_back.runtime.safe_casts.get_using_clause
  • dazzle_back.converters.entity_converter.convert_entities
  • re

Event Interactions

None detected.

Invariants and Assumptions

No invariants documented.

Tests

  • tests/unit/test_cli_env.py
  • tests/unit/test_alembic_env_url.py
  • tests/unit/test_set_factory_env.py

Notes

This page was automatically generated by tools/gen_reference_docs.py.