All Projects → Nebo15 → ecto_trail

Nebo15 / ecto_trail

Licence: MIT license
EctoTrail allows to store Ecto changeset changes in a separate audit_log table.

Programming Languages

elixir
2628 projects
shell
77523 projects

Projects that are alternatives of or similar to ecto trail

Cloak
Elixir encryption library designed for Ecto
Stars: ✭ 413 (+709.8%)
Mutual labels:  hex, ecto
ecto profiler
Project for Ecto DB profiling
Stars: ✭ 16 (-68.63%)
Mutual labels:  hex, ecto
Mssqlex
Microsoft SQL Server Adapter for Elixir
Stars: ✭ 38 (-25.49%)
Mutual labels:  hex, ecto
ecto commons
Ecto common validators for Date, Time, URLs, Emails, PostalCodes, Phone Numbers, Luhn checks, etc.
Stars: ✭ 33 (-35.29%)
Mutual labels:  hex, ecto
Ecto mnesia
Ecto adapter for Mnesia Erlang term database.
Stars: ✭ 223 (+337.25%)
Mutual labels:  hex, ecto
shipit
ShipIt automates Hex package publishing to avoid common mistakes
Stars: ✭ 21 (-58.82%)
Mutual labels:  hex
algoliax
Algolia integration to elixir application
Stars: ✭ 38 (-25.49%)
Mutual labels:  ecto
literate-binary
Integrate handcrafted binary and documentation
Stars: ✭ 37 (-27.45%)
Mutual labels:  hex
ex operation
A library for making domain operations in Elixir
Stars: ✭ 33 (-35.29%)
Mutual labels:  ecto
mongodb ecto
MongoDB adapter for Ecto
Stars: ✭ 348 (+582.35%)
Mutual labels:  ecto
python-base36
Yet another implementation for the positional numeral system using 36 as the radix
Stars: ✭ 21 (-58.82%)
Mutual labels:  hex
querie
Compose Ecto query from the client side
Stars: ✭ 20 (-60.78%)
Mutual labels:  ecto
phoenix pagination
Simple pagination for Ecto and Phoenix that uses plain EEx templates.
Stars: ✭ 20 (-60.78%)
Mutual labels:  ecto
music db
A playground for Ecto using a simple music database
Stars: ✭ 29 (-43.14%)
Mutual labels:  ecto
ectograph
Ectograph is a set of utility functions for using Ecto in combination with graphql-elixir/graphql
Stars: ✭ 29 (-43.14%)
Mutual labels:  ecto
strong migrations
Catch unsafe migrations in your Elixir application
Stars: ✭ 58 (+13.73%)
Mutual labels:  ecto
ArduboyCollection
Collection of Arduboy compiled games, demos and applications. Fork the repo and add your own games via Pull requests.
Stars: ✭ 99 (+94.12%)
Mutual labels:  hex
noire
🎨 Light/darken, mix, (de)saturate the colors in Golang with CMYK / RGB / HSV / HSL / Hex / HTML supported.
Stars: ✭ 38 (-25.49%)
Mutual labels:  hex
R3ditor
An open-source project created to reverse-engineering some Resident Evil 3 files
Stars: ✭ 19 (-62.75%)
Mutual labels:  hex
pfp-vim
A vim hex-editor plugin that uses 010 templates to parse binary data using pfp
Stars: ✭ 57 (+11.76%)
Mutual labels:  hex

EctoTrail

Hex.pm Downloads Latest Version License Build Status Coverage Status Ebert

EctoTrail allows to store changeset changes into a separate audit_log table.

Installation and usage

  1. Add ecto_trail to your list of dependencies in mix.exs:
def deps do
  [{:ecto_trail, "~> 0.4.0"}]
end
  1. Ensure ecto_trail is started before your application:
def application do
  [extra_applications: [:ecto_trail]]
end
  1. Add a migration that creates audit_log table to priv/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
  1. Use EctoTrail in your repo:
defmodule MyApp.Repo do
  use Ecto.Repo, otp_app: :my_app
  use EctoTrail
end
  1. Configure table name which is used to store audit log (in config.ex):
config :ecto_trail, table_name: "audit_log"
  1. Use logging functions instead of defaults. See EctoTrail module docs.

Docs

The docs can be found at https://hexdocs.pm/ecto_trail.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].