# `AshSqlite.Repo`
[🔗](https://github.com/ash-project/ash_sqlite/blob/v0.2.17/lib/repo.ex#L5)

Resources that use `AshSqlite.DataLayer` use a `Repo` to access the database.

This repo is a thin wrapper around an `Ecto.Repo`.

You can use `Ecto.Repo`'s `init/2` to configure your repo like normal, but
instead of returning `{:ok, config}`, use `super(config)` to pass the
configuration to the `AshSqlite.Repo` implementation.

## Additional Repo Configuration

Because an `AshPostgres.Repo` is also an `Ecto.Repo`, it has all of the same callbacks.

In the `c:Ecto.Repo.init/2` callback, you can configure the following additional items:

- `:tenant_migrations_path` - The path where your tenant migrations are stored (only relevant for a multitenant implementation)
- `:snapshots_path` - The path where the resource snapshots for the migration generator are stored.

# `installed_extensions`

```elixir
@callback installed_extensions() :: [String.t()]
```

Use this to inform the data layer about what extensions are installed

# `migrations_path`

```elixir
@callback migrations_path() :: String.t() | nil
```

The path where your migrations are stored

# `min_pg_version`

```elixir
@callback min_pg_version() :: integer()
```

Use this to inform the data layer about the oldest potential sqlite version it will be run on.

Must be an integer greater than or equal to 13.

# `override_migration_type`

```elixir
@callback override_migration_type(atom()) :: atom()
```

Allows overriding a given migration type for *all* fields, for example if you wanted to always use :timestamptz for :utc_datetime fields

---

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