Technical questionAccepted answer
Why is my Rails `db/schema.rb` prefixing functions with `public`?
Chris LaBarge
Dec 28
0 views1
Upon rebuilding my Postgresql database from a dump file using pg_restore, my schema file db/schema.rb is now prefixing the gen_random_uuid() function with public.
create_table "cars", id: :uuid, default: -> { "public.gen_random_uuid()" }
How can I prevent from the schema file from prefixing method calls with public?
1 answer
Accepted answer · original discussion
Manuel van Rijn
PermalinkDec 22
I think the problem isn't rails specific, more pg_dump specific. If you read the dump, it probably creates the functions with the public. prefix?
Here's a similar problem which might help you out: How force pg_dump to (not) include scheme name for each objects in DDL
0 question comments
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.