Description
EctoTrail allows to store Ecto changeset changes in a separate audit_log table.
EctoTrail alternatives and similar packages
Based on the "ORM and Datamapping" category.
Alternatively, view EctoTrail alternatives based on common mentions on social networks and blogs.
-
memento
Simple + Powerful interface to the Mnesia Distributed Database 💾 -
paper_trail
Track and record all the changes in your database with Ecto. Revert back to anytime in history. -
ExAudit
Ecto auditing library that transparently tracks changes and can revert them. -
ecto_psql_extras
Ecto PostgreSQL database performance insights. Locks, index usage, buffer cache hit ratios, vacuum stats and more. -
arbor
Ecto elixir adjacency list and tree traversal. Supports Ecto versions 2 and 3. -
sqlitex
An Elixir wrapper around esqlite. Allows access to sqlite3 databases. -
boltun
Transforms notifications from the Postgres LISTEN/NOTIFY mechanism into callback execution -
sql_dust
Easy. Simple. Powerful. Generate (complex) SQL queries using magical Elixir SQL dust.
Collect and Analyze Billions of Data Points in Real Time
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of EctoTrail or a related project?
Popular Comparisons
README
EctoTrail
EctoTrail allows to store changeset changes into a separate audit_log
table.
Installation and usage
- Add
ecto_trail
to your list of dependencies inmix.exs
:
def deps do
[{:ecto_trail, "~> 0.4.0"}]
end
- Ensure
ecto_trail
is started before your application:
def application do
[extra_applications: [:ecto_trail]]
end
- Add a migration that creates
audit_log
table topriv/repo/migrations
folder:
defmodule EctoTrail.TestRepo.Migrations.CreateAuditLogTable do
@moduledoc false
use Ecto.Migration
def change do
create table(:audit_log, primary_key: false) do
add :id, :uuid, primary_key: true
add :actor_id, :string, null: false
add :resource, :string, null: false
add :resource_id, :string, null: false
add :changeset, :map, null: false
timestamps([type: :utc_datetime, updated_at: false])
end
end
end
- Use
EctoTrail
in your repo:
defmodule MyApp.Repo do
use Ecto.Repo, otp_app: :my_app
use EctoTrail
end
- Configure table name which is used to store audit log (in
config.ex
):
config :ecto_trail, table_name: "audit_log"
- Use logging functions instead of defaults. See
EctoTrail
module docs.
Docs
The docs can be found at https://hexdocs.pm/ecto_trail.
*Note that all licence references and agreements mentioned in the EctoTrail README section above
are relevant to that project's source code only.