# `Arcadic.MigrationSource`
[🔗](https://github.com/baselabs/arcadic/blob/baselabs_arcadic-v4.0.1/lib/arcadic/migration_source.ex#L5)

Loads trusted migration files from a directory at runtime, including in a release.

Load files from the build's application assets, such as a directory under
`:code.priv_dir/1`. Each `.exs` file must define at least one migration.
Auxiliary modules in the same file are allowed. Files are loaded in filename
order, then migrations are returned in version order. A loaded file is immutable
for the lifetime of the VM. Deploy a new release to change loaded migrations.

# `duplicate_error`

```elixir
@type duplicate_error() :: {:duplicate_migration_versions, [pos_integer()]}
```

# `load`

```elixir
@spec load(Path.t()) ::
  {:ok, [module()]}
  | {:error, File.posix() | :invalid_migration_file | duplicate_error()}
```

Load immediate `.exs` children and return their migration modules.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
