# `SferaDoc.Store.Ecto`
[🔗](https://github.com/sfera-lab/sfera-doc/blob/v0.1.0/lib/sfera_doc/store/ecto/adapter.ex#L3)

Ecto-backed storage adapter for SferaDoc.

Works with PostgreSQL, MySQL, and SQLite via `ecto_sql`.

## Configuration

    config :sfera_doc, :store,
      adapter: SferaDoc.Store.Ecto,
      repo: MyApp.Repo

The Ecto repo is managed by the host application's supervision tree.
SferaDoc does not start or supervise it (`worker_spec/0` returns `nil`).

## Database Setup

Add a migration to your app:

    defmodule MyApp.Repo.Migrations.CreateSferaDocTemplates do
      use SferaDoc.Store.Ecto.Migration
    end

Or run: `mix sfera_doc.ecto.setup`

---

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