Forum OpenACS Development: Re: Upgrade and install management

Collapse
Posted by Don Baccus on
b) If there is a problem with the upgrade.sql files (see above), why not change our default behavior to do upgrades not in the SQL upgrade but within a special "sql_upgrade" callback, which allows us to source DM changes with db_transaction, therefore not loading a file but executing dml commands from TCL
Why a special callback? I already do my upgrade scripts in Tcl as much as possible, using the existing upgrade callbacks, wrapping the DML in a transaction.

This has the advantage that given today's mature versions of PG and Oracle (i.e. better SQL 92 support in both), odds are much higher than in the past that one can write an upgrade script using DML in Tcl that works fine for both DBs.

While writing SQL upgrade scripts requires you write one for PG and one for Oracle, even if they're the same, if you follow our standard upgrade conventions.