I’m currently reviewing a very nice change which adds support for Debian errata in Katello. There’s one aspect of the PR that I’m looking for feedback on which is the inclusion of a postgresql function that compares versions of Debian packages.
The problem is that Rails uses db/schema.rb to migrate the test database but ActiveRecord does not place this new function into schema.rb
One potential workaround is to change Foreman’s config/application.rb to include this setting:
config.active_record.schema_format = :sql This will use pg_dump to create a .sql file containing actual SQL queries to create the schema which will reflect the custom function. I’m not sure if this has any negative implications for us. Beyond that I don’t really see a good way to go about this.