AshScylla.SchemaLoader (AshScylla v0.10.2)

Copy Markdown View Source

Loads and discovers schema migration modules from priv/migrations.

Summary

Functions

Discovers all .ex files under priv/migrations for the current project.

Loads a schema module from a file path and returns its change/0 statements.

Types

loaded()

@type loaded() :: {:ok, module()} | {:error, term()}

Functions

discover()

@spec discover() :: [String.t()]

Discovers all .ex files under priv/migrations for the current project.

load(path)

@spec load(String.t()) :: {:ok, [String.t()]} | {:error, term()}

Loads a schema module from a file path and returns its change/0 statements.

Supports both flat CQL string lists and struct-based %AshScylla.Schema{} entries. Struct-based entries are automatically flattened via AshScylla.Schema.flatten/1.