Ruby on Rails
Monday, July 10, 2017
That's what I thought but I wasn't sure where to place the uuid_function that the migration refers to. So that go in a helper file or part of the migration?
On Monday, July 10, 2017 at 4:38:06 AM UTC-7, Matt Hickman wrote:
-- On Monday, July 10, 2017 at 4:38:06 AM UTC-7, Matt Hickman wrote:
If you look my_uuid_generator() is added to postgres at https://github.com/rails/rails/blob/ 650ea5e5cf50d8a7242499463cf176 2922d330a8/activerecord/test/ cases/adapters/postgresql/ uuid_test.rb#L186 You can add a stored procedure in a similar fashion in a migration.--Matt HickmanOn Sun, Jul 9, 2017 at 6:56 PM, <johnpea...@gmail.com> wrote:Hi, I was reading the docs for primary key on postgresql and I saw that there was a way to add a custom stored procedure that returns a UUID. There is a test case as well that uses a custom uuid generator https://github.com/--rails/rails/blob/ but I wasn't sure how to to implement this myself.650ea5e5cf50d8a7242499463cf176 2922d330a8/activerecord/test/ cases/adapters/postgresql/ uuid_test.rb#L193 Like in the test case where do I place 'my_uuid_generator()' and how to implement it in my rails application?Thanks.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com .
To post to this group, send email to rubyonra...@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ .06bd9a3c-eafa-496b-a611- 2d35906517a3%40googlegroups. com
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ea4c0dbb-317d-428a-9534-80ca70b1e2f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment