SferaDoc.Store.Ecto (sfera_doc v0.1.0)

Copy Markdown View Source

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