Comments (6)
This can be achieved pretty easy already with the whodoneit-map
install option. For example, in the example in the readme file, you can modify the defp whodoneit(conn) do
function to create your own map, including with what ever data you want.
I don't think an additional map is required.
from whatwasit.
Can I keep relation belongs_to
to User
and store map of additional data at same time?
I need one more query for each version instead of querying by relations.
from whatwasit.
Is there a good reason to do so? Can you give an example that warrants having both a module model reference and a separate map of additional data. I'm a little hesitant since it adds additional complication and I want to make sure there is a good use case for it.
from whatwasit.
For example:
I know Mike. He is good editor and my friend from real world, but his account was hacked (e.g "Social engineering").
- I want to retrieve list all changes made by Mike to sum his job and send payment.
- I want to retrieve list all changes made by hacker IP (stored in request map) to detect unwanted system changes and revert them.
- We have trainee. He is temporary editor, but he has problem with grammar. We need to delete his account and all changes that was made by him (
has_many
reference).
from whatwasit.
So, what wrong with using the whodoneit-map
option and store the following map?
%{user_id: user.id, request_ip: header.ip, username: user.username, ...}
from whatwasit.
See: Add dependent opts #723. I want to use dependent for versions (see example in point 3 of my comment above).
from whatwasit.
Related Issues (16)
- User model should be an option
- Diff support for String HOT 2
- Advenced reverting HOT 2
- Add log file support (fail2ban and other log tools) HOT 1
- Story only changed fields in object HOT 4
- Question: why migration and model are generated? HOT 3
- Fork: Refactor and simplify code HOT 10
- Auditing branch doesnt work with --whodoneit-map HOT 1
- Support a user model that is not an Ecto model
- installation error
- Only works with integer ids, would be nice to make it work with UUID
- Violation of changeset design principals? HOT 9
- Track creates HOT 5
- Default parameter specifier of changeset function in output of command "mix whatwasit.install" HOT 2
- Conflicts with local function HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whatwasit.