FootPrint
Track changes to your database with Ecto
Table of contents
Getting started
-
The package can be installed by adding
footprintto your list of dependencies inmix.exs:
def deps do
[
{:footprint, "~> 0.2.0"}
]
end-
Add the Repo of your app and the desired per_page to the
footprintconfiguration inconfig.exs:
config :footprint, repo: MyApp.RepTODO
-
Build
Footprint.insert(changeset)func. -
Build
Footprint.update(changeset)func. -
Build
Footprint.delete(changeset)func. - Gets a object all version.
- Diff object version.
- Apply one operation.
- Support meta info.
- Add event and inspect output.
Demo
The dummy app shows a simple turbo_ecto example.
Clone the repository.
https://github.com/zven21/footprint.gitChange directory
$ cd dummyRun mix
$ mix deps.get && yarn --cwd=assetsPreparing database
$ mix ecto.setupStart the Phoenix server
$ ./script/server
Open your browser, and visit http://localhost:4000
Contributing
Bug report or pull request are welcome.
Make a pull request
- Fork it
-
Create your feature branch (
git checkout -b my-new-feature) -
Commit your changes (
git commit -am 'Add some feature') -
Push to the branch (
git push origin my-new-feature) - Create new Pull Request
Please write unit test with your code if necessary.
License
The gem is available as open source under the terms of the MIT License.
Credits
- paper_trail - Similar implementation.