Hello,
I’m currently reviewing a very nice change which adds support for Debian errata in Katello[1]. 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[2].
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.
Any thoughts?
[1] https://github.com/Katello/katello/pull/7961
[2] https://github.com/Katello/katello/pull/7961/files#diff-8ea9be1576c2fa2ee791f4949f23018b