Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added custom types for item_id and originator_id #19

Merged
merged 2 commits into from
May 25, 2017

Conversation

narrowtux
Copy link
Contributor

Needed the same thing as #14, found a fairly elegant solution IMHO.

Using Application.get_env, the type in the schema can be overwritten at compile time.

You still need to edit the types in the generated migration, this is documented in the README.

@izelnakri
Copy link
Owner

Thank you for a very interesting PR! Could you write tests as well?

@narrowtux
Copy link
Contributor Author

I should definitely write some tests but it's a huge effort since the database structure is different. Maybe I can reuse the existing tests and introduce a variable to switch from :integer to Ecto.UUID and just test the normal tests twice.

@drapergeek
Copy link
Contributor

Thank you so much for implementing this! I just ran into this exact same issue, I'd love to be able to use this feature!

@narrowtux
Copy link
Contributor Author

You can test this by changing

{:paper_trail, "~> 0.7.3"} to {:paper_trail, github: "narrowtux/paper_trail"} in your mix.exs.

@drapergeek
Copy link
Contributor

Thanks, already on it. I'll let you know if I run into any issues.

@drapergeek
Copy link
Contributor

This works great for me, just wanted to put a 👍 on here for getting this into hex.

@izelnakri
Copy link
Owner

izelnakri commented May 24, 2017

thank you once again for your contribution @narrowtux. I discourage using github based packages for production, its ok for testing something.

I'm willing to merge this if there were well written throughout tests like we have for hash bang functions, strict mode etc. If you would like this to be merged soon please do not hesitate to contribute! Otherwise I dont know when I will find the time to write them for you guys, currently Im very busy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants