One-line summary for developers: >From now on, please have PostgreSQL in mind even for schema upgrades.
Full story: With spacewalk-schema-1.3.17-1, the upgrade from 1.2 to nightly ends up with the same schema content (definition) as fresh Spacewalk nightly installation, even on PostgreSQL, after the spacewalk-schema-upgrade was executed. I've added the necessary schema upgrade scripts for to achieve that, and we need to keep PostgreSQL upgradable from now on. The schema/spacewalk/upgrade/spacewalk-schema-* directories can have not only .sql files now, but also .sql.oracle and .sql.postgresql content. If the schema upgrade script runs fine both on sqlplus and on psql, just leave it as .sql, like we did for all the previous releases. If however there needs to be different syntax on Oracle than on PostgreSQL, create *both* .sql.oracle and .sql.postgresql scripts, and mark the PostgreSQL one as equivalent to the Oracle one using the SQL comment on the first line of the .sql.postgresql file, with the has being sha1sum of the Oracle schema upgrade script, for example -- oracle equivalent source sha1 b14267384bc104605623a41b755e68e0103b5aa8 Maybe the change is only needed on one of those database backends. Even in this case you have to create both files, and put a comment like -- This file is intentionally left empty. into the unneeded one, to make it clear that you really did not mean to put any SQL there. The schema-source-sanity-check.pl script was amended to check that indeed both variants exist if one of them exists, and you are welcome to check your schema changes with this script before pushing your schema or schema upgrade changes. The script is run upon rpm build time and the build fails if the check does not pass, so you really want to make sure you add all the necessary files. Thank you, -- Jan Pazdziora Principal Software Engineer, Satellite Engineering, Red Hat _______________________________________________ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel