Defines a temporal Ecto schema and its read-only history counterpart.
Use this module instead of Ecto.Schema, then call temporal_schema/2:
defmodule MyApp.Shareholder do
use SysTime.Schema
temporal_schema "shareholders" do
field :name, :string
belongs_to :company, MyApp.Company
end
endThe generated History schema deliberately contains no associations and no
primary key. Historical rows are values, not independently writable entities.
Summary
Functions
Defines the live schema and a nested History schema over <source>_history.