You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The structure.sql dump file created by the postgres database dump tool does not leave the search_path paramater in a predictable state if the database contains different schemas (other than public). Accordingly the statements to insert the migration rows appended to the structure.sql might not work if the search_path doesn't include the public schema.
This produces the following error
ERROR: relation "schema_migrations" does not exist
The following monkey patch fixes this problem for postgres
module SequelRails
class Migrations
class << self
alias_method :dump_schema_information_orig, :dump_schema_information
def dump_schema_information(opts = {})
if opts.fetch :sql
"SET search_path = public, pg_catalog;\n"
else
''
end + dump_schema_information_orig(opts)
end
end
end
end
The text was updated successfully, but these errors were encountered:
The structure.sql dump file created by the postgres database dump tool does not leave the search_path paramater in a predictable state if the database contains different schemas (other than public). Accordingly the statements to insert the migration rows appended to the structure.sql might not work if the search_path doesn't include the public schema.
This produces the following error
The following monkey patch fixes this problem for postgres
The text was updated successfully, but these errors were encountered: