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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With